Created
December 9, 2016 05:34
-
-
Save skrisna/50ec2b89a8c166f081640f212e5975f2 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
subset Prime of Int where *.is-prime; | |
subset SmallPrime of Prime where * < 40_000; | |
subset BigPrime of Prime where * >= 10_000; | |
multi MAIN ( BigPrime $num ) { say "Prime number! Nice and big"; } | |
multi MAIN ( SmallPrime $num ) { say "Puny prime number"; } | |
multi MAIN ( $num ) { say "Gimme prime!"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment