Skip to content

Instantly share code, notes, and snippets.

@coke

coke/a.p6 Secret

Created February 22, 2017 15:52
Show Gist options
  • Save coke/9f4df5c5b90b356c40cbfe3cbbe98fb6 to your computer and use it in GitHub Desktop.
Save coke/9f4df5c5b90b356c40cbfe3cbbe98fb6 to your computer and use it in GitHub Desktop.
say 'start';
multi sub trait_mod:<is>(Sub $s, :$foo){ {}
say "⟨is foo⟩ has been called with ⟨$foo⟩ on {$s.WHICH}";
}
sub bar() is foo<oi‽> { {}
say 'bar has been called'
}
bar();
# OUTPUT: «⟨is foo⟩ has been called with ⟨oi‽⟩ on Sub|47563000␤start␤bar has been called␤»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment