Created
May 12, 2015 01:49
-
-
Save tony-o/2b309e70ed16867e0849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Func { | |
has Callable $.code; | |
method exec(*@a) { | |
$.code.(@a); | |
} | |
} | |
my $f = Func.new(:code(-> *@x { say @x.perl; })); | |
say $f.exec(1,2,3); | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment