Overview
Function arity describes the number of parameters that a function takes.
Arity
Arity refers to the number of arguments in a function.
- Unary
{% f(x) %}
-
Binary
A two place function is a function with two variables.
{% f(x_1,x_2) %}Binary functions form the core of algebra. (The common examples of binary functions being addition and multiplication).
-
N-Arity
{% f(x_1,x_2, ... ,x_n) %}
Equivalences
In computer science, n-arity functions are often recast as unary functions in one of two ways
- as a function of a single ordered pair
- as a curried function
By recasting all functions as unary functions, the space of functions and types over which the functions operate becomes a category.