Moritz (>), Илья (>>):
>> I have array ref
>> my $ar = [1,2,3];
>> how can I go over it?
>
> Currently I think you can't, because the array contextualizer isn't
> implemented yet. I think it should be
>
> for @$ar { ... }
> or even
> for @ $ar { ... }
> or
> for @($ar) { ... }

This would arguably be the nicest variant.

> Last time I tried, there as a workaround with binding to a temporary array:
>
> my @a := $ar;
> for @a { ... }
>
> but it's not pretty, and I haven't tested it yet.

Nope, doesn't work anymore in the latest Rakudo.

// Carl

Reply via email to