Arity is the number of arguments a function takes. This applies to arbitrary functions and basic operand functions alike (f(x,y)
and x+y
both have an arity of 2).
- nullary function takes no arguments
- unary function takes one argument
- binary function takes two arguments
- ternary function takes three arguments
- n-ary function takes n arguments