Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a few more method definitions and an example
  • Loading branch information
Jan-Olof Hendig committed Sep 25, 2016
1 parent 03a21f8 commit 9e92433
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/Type/Parameter.pod6
Expand Up @@ -33,6 +33,10 @@ If the parameter is anonymous, C<Nil> will be returned.
=head2 method sigil
Defined as:
method sigil(Parameter:D:) returns Str:D
Returns a string containing the parameter's sigil, for a looser
definition of "sigil" than what is considered part of
the variable's C<name|method name>. Still returns a sigil even
Expand Down Expand Up @@ -72,8 +76,16 @@ Defined as:
Returns C<True> if it's a L<named parameter|/type/Signature#Positional_vs._Named>.
my Signature $sig = :(Str $x, Bool :$is-named);
say $sig.params[0].named; # False
say $sig.params[1].named; # True
=head2 method named_names
Defined as:
method named_names(Parameter:D:) returns List:D
Returns the list of externally usable names/aliases for a
L<named parameter|/type/Signature#Positional_vs._Named>.
Expand Down Expand Up @@ -204,6 +216,10 @@ this parameter, or C<Any> if no default was provided.
=head2 method type_captures
Defined as:
method type_captures(Parameter:D:) returns List:D
Returns a list of variable names of type captures associated with this
parameter. Type captures define a type name within the attached code,
which is an alias to the type gleaned from the argument during a call.
Expand Down

0 comments on commit 9e92433

Please sign in to comment.