Created
June 23, 2017 13:14
-
-
Save colomon/28fa4731c5ba56a8cb0d3641b2770338 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
multi what's-that(42) { take 'The Answer' } | |
multi what's-that(Int $ where *.is-prime) { take 'Tis a prime!' } | |
multi what's-that(Numeric) { take 'Some kind of a number' } | |
multi what's-that($a, *@b where @b > 0) { what's-that($a); what's-that(|@b); } | |
multi what's-that { how-good-is $^it } | |
sub how-good-is ($) { take rand > ½ ?? 'Tis OK' !! 'Eww' } | |
my $seq := gather what's-that(1, 31337, 42, 'meows'); | |
.say for $seq; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment