Skip to content

Instantly share code, notes, and snippets.

@leedo
Created July 2, 2013 04:59
Show Gist options
  • Save leedo/5906863 to your computer and use it in GitHub Desktop.
Save leedo/5906863 to your computer and use it in GitHub Desktop.
sub n (*@flat) {
say "flattened " ~ @flat.elems;
}
multi sub m (*@flat) {
say "flattened " ~ @flat.elems;
}
multi sub m ((Range $range)) {
say "got Range";
}
my $r = 0..10;
# works
n((1,2,3,));
# works
m(($r,));
# Nominal type check failed for parameter '$range' in sub-signature
m((1,2,3,));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment