- or download this
my @foo = { state $n=-1; $n++; sub ($x,$y) { $x+$y+$n } } ... *;
- or download this
my $foo_0 = @foo[0].(3,5);
my $foo_1 = @foo[1].(3,5);
my $foo_2 = @foo[2].(3,5);
- or download this
10
10
10
- or download this
8
9
10
- or download this
my @foo = { state $n=-1; $n++; my $p=$n; sub ($x,$y) { $x+$y+$p } } ..
+. *;