Created
December 1, 2016 17:15
-
-
Save zoffixznet/53dcd746a5e3c639b9faa1848417b557 to your computer and use it in GitHub Desktop.
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
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