Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created October 3, 2012 12:34
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 jnthn/3826700 to your computer and use it in GitHub Desktop.
Save jnthn/3826700 to your computer and use it in GitHub Desktop.
use MONKEY_TYPING;
augment class Signature {
multi method ACCEPTS(Signature:D: Signature:D $topic) {
return False unless $topic.params == self.params;
for $topic.params Z self.params -> $t, $s {
return False unless $t.type ~~ $s.type;
}
return True;
}
}
say :(Str) ~~ :(Str);
say :(Int) ~~ :(Str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment