Follow

A nicely written page on how to iterate in perl6 is another angle on the perl6 is not part of regular reality.

perl6advent.wordpress.com/2009

for 1, 2, 3, 4 -> $i, $j { "$i, $j".say } (thats what id expect but wasnt seeing)

for @array { .say } (a default variable, nice and clean)

@array.map: *.say; (a default block, ultra minimalist, bordering on unreadable)

""Or a *hyperoperator*, if order and sequentiality isnt important"

@array».say

Sign in to participate in the conversation
Mastodon

Generalistic and moderated instance. All opinions are welcome, but hate speeches are prohibited. Users who don't respect rules will be silenced or suspended, depending on the violation severity.