Skip to content

Commit ae479a7

Browse files
committed
start to document Signature
no signature literals yet
1 parent 31dc410 commit ae479a7

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

lib/Signature.pod

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
=begin pod
2+
3+
=TITLE class Signature
4+
5+
class Signature { ... }
6+
7+
A signature is a static description of the parameter list of a code object.
8+
That is, it describes what and how many arguments you need to pass to it
9+
for invocation.
10+
11+
Passing arguments to a signature I<binds> the arguments the parameters,
12+
and loosly speaken to the signature.
13+
14+
=head1 Methods
15+
16+
=head2 params
17+
18+
method params(Signature:D:) returns Positional
19+
20+
Returns the list of L<Parameter> objects that make up the signature.
21+
22+
=head2 arity
23+
24+
method arity(Signature:D:) returns Int:D
25+
26+
Returns the minimal number of positional arguments required to satisfy
27+
the signature.
28+
29+
=head2 count
30+
31+
method count(Signature:D:) returns Real:D
32+
33+
Returns the maximal number of positional arguments which can be bound
34+
to the signature. Returns C<Inf> if there a positional parameter is slurpy.
35+
36+
=end pod

0 commit comments

Comments
 (0)