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
| multi trait_mod:<is>(Routine:D $r, :$randomly_dispatched!) { | |
| $r does role { | |
| method find_best_dispatchee(|) { | |
| self.dispatchees.pick() | |
| } | |
| } | |
| } | |
| proto foo($) is randomly_dispatched { * } | |
| multi foo($x) { say 'omg' } | |
| multi foo($x) { say 'wtf' } | |
| multi foo($x) { say 'bbq' } | |
| foo(1) for ^5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment