Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created December 1, 2016 17:15
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 zoffixznet/53dcd746a5e3c639b9faa1848417b557 to your computer and use it in GitHub Desktop.
Save zoffixznet/53dcd746a5e3c639b9faa1848417b557 to your computer and use it in GitHub Desktop.
class Thingie {
subset MoreNarrow of Str where {True};
multi method stuff (MoreNarrow $ where /meows/) {
say "Meow meow!";
}
}
class SubThingie is Thingie {
subset LessNarrow of Any where {True};
multi method stuff (LessNarrow $ where /foos/) {
say "Just foos...";
}
}
SubThingie.new.stuff: 'meows and foos';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment