Skip to content

Instantly share code, notes, and snippets.

@Altreus
Created October 3, 2018 11:24
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 Altreus/da60f1c2739b7ead0331c4a27cd7c40f to your computer and use it in GitHub Desktop.
Save Altreus/da60f1c2739b7ead0331c4a27cd7c40f to your computer and use it in GitHub Desktop.
role Frobber {
method frob ($x) { say $x }
}
role Frobnicator does Frobber {
has $.x;
multi method frob ($x) { self.Frobber::frob($x) }
multi method frob () { self.frob($.x) }
}
class Frobnify does Frobnicator {}
Frobnify.new(:x("cats")).frob;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment