Skip to content

Instantly share code, notes, and snippets.

@tony-o
Created May 12, 2015 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tony-o/2b309e70ed16867e0849 to your computer and use it in GitHub Desktop.
Save tony-o/2b309e70ed16867e0849 to your computer and use it in GitHub Desktop.
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