In Perl 6 you use %hash.kv to iterate over hashes, and if you want to interate over arrays and get the index at the same time, you use @list Z ^@list or even @list Z 0 .. *. (Note that lists are lazy, so a list of all items is essentially the same as an iterator).
So what would you use each for?
In reply to Re^3: [Perl6] comma vs semicolon in 'each' ?
by moritz
in thread [Perl6] comma vs semicolon in 'each' ?
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |