Andrew,

Multi-dimensional structures are currently not supported in Pugs. But never fear, Autrijus is working on them right now actually. He is in the process of refactoring some of the Array and Hash types (in Haskell) to support this.

What you are seeing in this example:

my @z = (
    [ 'a1', 'a2' ],
    [ 'b1', 'b2', 'b3' ]
);
for @z -> $r { say $r }

However, the p5 version prints:

a1 a2
b1 b2 b3

while the pugs p6 version prints:

a1
a2
b1
b2
b3

Is the current Pugs behavior of auto-dereferencing and flattening the inner lists (much like perl5 would do if they were @arrays not $array_refs). I would expect that in the next day or two the above code should work as you expect it to (I think Autrijus is trying to finish before Sunday/Monday's release).


- Stevan



Reply via email to