method arity
1 | class Code |
1.1 | (Code) method arity |
2 | class Signature |
2.1 | (Signature) method arity |
3 | class ForeignCode |
3.1 | (ForeignCode) method arity |
Documentation for method arity
assembled from the following types:
class Code
From Code
(Code) method arity
Defined as:
method arity(Code: --> Int)
Returns the minimum number of positional arguments that must be passed in order to call the code object. Any optional or slurpy parameters in the code object's Signature
do not contribute, nor do named parameters.
sub argless()sub args(, ?)sub slurpy(, , *)say .arity; # OUTPUT: «0»say .arity; # OUTPUT: «1»say .arity; # OUTPUT: «2»
class Signature
From Signature
(Signature) method arity
method arity(Signature: --> Int)
Returns the minimal number of positional arguments required to satisfy the signature.
class ForeignCode
From ForeignCode
(ForeignCode) method arity
method arity()
Returns the arity of the enclosed code.