In Glossary§
See primary documentation in context for Arity.
The number of Positional
operands expected by an operator, subroutine, method or callable block.
sub infix:<+>(Foo $a, Foo $b) { $a.Int + $b.Int } # arity of "+" is 2 sub frobnicate($x) { ... } # arity of 1 sub the-answer() { 42 } # arity of 0 -> $key, $value { ... } # arity of 2
The arity of a Callable
is one of the main selectors in multi-dispatch.