Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more index entries for Signature
  • Loading branch information
gfldex committed Jun 17, 2016
1 parent 3c254d7 commit db08a29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/Type/Signature.pod
Expand Up @@ -13,6 +13,7 @@ you need to pass to the code or function in order to call it.
Passing arguments to a signature I<binds> the arguments, contained in
a L<Capture>, to the signature.
X<|signature literal (Signature)>
=head1 Signature Literals
Signatures appear in parenthesis after subroutine and method names, on
Expand Down Expand Up @@ -90,6 +91,7 @@ L<class|/syntax/class> Foo {
say Foo.whoami; # => Well I'm class Foo, of course!
=end code
X<|type constraint (Signature)>
=head2 Type Constraints
Parameters can optionally have a type constraint (the default is L<C<Any>>).
Expand All @@ -102,6 +104,7 @@ sub divisors (B<L<Int>> $n) { $_ if $n L<%%> $_ for 1..$n }
divisors 2.5; # !!! Calling 'divisors' will never work with argument types (L<Rat>)
=end code
X<|anonymouse arguments (Signature)>
Anonymous parameters are fine too, if a parameter is only needed for
its type constraint.
Expand Down

0 comments on commit db08a29

Please sign in to comment.