Skip to content

Instantly share code, notes, and snippets.

Created October 15, 2015 16:31
Show Gist options
  • Save anonymous/c0f7a60cfedcf1214c3a to your computer and use it in GitHub Desktop.
Save anonymous/c0f7a60cfedcf1214c3a to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
class blah {
...
# From here, the "default case" for all numeric types,
# with no extra parameters. Just simple pass-throughs.
multi method numeric-atom($/ (:$val, :$xtnd) ) {
$/.make( $val.made );
}
multi method decimal($/ (:$val) ) {
$/.make( $val.made );
}
multi method complx($/ (:$val) ) {
$/.make( $val.made );
}
multi method rational($/ (:$val) ) {
$/.make( $val.made );
}
multi method scientific($/ (:$val) ) {
$/.make( $val.made );
}
multi method j-int($/ (:$val) ) {
$/.make( $val.made );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment