in reply to Re: Functional Programming & method rewriting
in thread Functional Programming & method rewriting
my $hi_mom = prefix_later( sub { my $f = shift(); print "got: $f\n"; }, sub { print "this was unneccessary:\n"; } ); $hi_mom->("nerp") for (1..3);
Output:
got: nerp this was unneccessary: got: nerp this was unneccessary: got: nerp
|
---|