I don't know if it's a bug, it might be ordinary closure cloning at work.
This works too:
my $s = { state $n=-1; $n++; sub ($x,$y) { $x+$y+$n } }; my @foo = $s ... *; say @foo[0].(3,5); say @foo[1].(3,5); say @foo[2].(3,5);
In reply to Re^4: Perl6 lazy list of code blocks
by moritz
in thread Perl6 lazy list of code blocks
by aes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |