Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
signatures do smartmatch against Hash
  • Loading branch information
gfldex committed Jun 17, 2016
1 parent ae72862 commit 3c254d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/Type/Signature.pod
Expand Up @@ -59,6 +59,12 @@ Smart matching signatures against a List is supported.
}
# OUTPUT«match␤»
When smart matching against a Hash, the signature is assumed to consist of the keys of the Hash.
my %h = left => 1, right => 2;
say %h ~~ :(:$left, :$right);
# OUTPUT«True␤»
=head2 Parameter Separators
A signature consists of zero or more I<L<parameters|Parameter>>, separated by comma.
Expand Down

0 comments on commit 3c254d7

Please sign in to comment.