in reply to Re^3: Perl6 lazy list of code blocks
in thread Perl6 lazy list of code blocks
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl6 lazy list of code blocks
by aes (Initiate) on May 24, 2012 at 10:34 UTC |