This is the revision history for closure in <discord.gg:##voots>
factoid_id | subject | copula | predicate | author | namespace |
---|---|---|---|---|---|
4724 | closure | is | eval: sub closure { my $foo; sub { $foo ++ } }; my $sub = closure(); my $other = closure() ; [ $sub->(), $sub->() , $other->(), $other->(), $other->() ] # note that the $foo that belongs to $sub is different from the $foo that $other has... and that they both continue to exist due to there being a reference to a sub in the scope they reside within. see also: coping with scoping | perlbot | <*:##NULL> |