Skip to content

Instantly share code, notes, and snippets.

@masak

masak/code.p6 Secret

Last active August 29, 2015 14:07
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 masak/67bbd56426b12d0e5943 to your computer and use it in GitHub Desktop.
Save masak/67bbd56426b12d0e5943 to your computer and use it in GitHub Desktop.
weird code
sub matches(&criteria) {
my &*MATCH_MOVE = sub ($m) { return True };
&criteria();
my &match-move = &*MATCH_MOVE;
return Any.new but role {
method ACCEPTS(Move $m) {
match-move($m)
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment