If that's what he meant, this would be the equivalent Perl6 code, using state:
sub genclosure { return sub { state $bar; $bar++; } }
I'm still not seeing a difference in safety.
In reply to Re^4: How will you use state declared variables in Perl6?
by revdiablo
in thread How will you use state declared variables in Perl6?
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |