RosettaCodeData/Task/Closures-Value-capture/Perl-6/closures-value-capture-1.pl6
2015-02-20 09:02:09 -05:00

5 lines
108 B
Raku

my @c = gather for ^10 -> $i {
take { $i * $i }
}
.().say for @c.pick(*); # call them in random order