-
-
Save masak/67bbd56426b12d0e5943 to your computer and use it in GitHub Desktop.
weird code
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
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