Browse files

Add documentation for

  • Loading branch information...
lizmat committed Jan 11, 2019
1 parent 4830298 commit 98301ace312aa7dfb9fd8e6f5be6c6e23546de60
Showing with 29 additions and 0 deletions.
  1. +29 −0 doc/Type/Signature.pod6
@@ -1048,6 +1048,35 @@ Defined as:
Throws C<X::Cannot::Capture>.
=head1 Runtime creation of Signature objects (6.d, 2019.01 and later) => (...), returns => Type, arity => 1, count => 1)
In some situations, specifically when working with the MetaObject Protocol,
it makes sense to create C<Signature> objects programmatically. For this
purpose, you can call the C<new> method with the following named parameters:
=item params
A list of L<Parameter|/type/Parameter> objects for this signature.
=item returns
Any constraint the return value should match. Defaults to C<Mu>, which
effectively implies no return value constraint check.
=item arity
The I<minimal> number of positional arguments required to satisfy the
signature. Defaults to the number of C<Parameter> objects given with
the C<params> parameter.
=item count
The I<maximal> number of positional arguments which can be bound to the
signature. Defaults to the C<arity> if not specified. Specify C<Inf> if
there is a slurpy positional parameter.
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 comments on commit 98301ac

Please sign in to comment.