Arity
Arity is the number of arguments or operands an operation accepts.
Clojure: The Essential Reference
An arity is a function signature defined by the number of arguments it accepts.
- How it is used
- Uses arity to distinguish function signatures and explain how arithmetic calls behave at different argument counts.
- How deep it goes
- Defines arity through parameter vectors and works through arithmetic edge cases; does not explain function dispatch internals.
- Examples
- Shows a two-arity anonymous function, a recursive Fibonacci function, and arithmetic identities applied to an empty collection.
- What you can do after
- Build it from scratch with multiple fn signatures and evaluate arithmetic calls by their argument count.
Functional Programming in JavaScript
The number of arguments a function accepts.
- How it is used
- Uses arity to determine whether functions can receive values in a pipeline.
- How deep it goes
- Defines arity and demonstrates runtime tuple validation, while deferring broader type-system treatment.
- Examples
- Uses trim and normalize pipelines, multi-argument HTTP functions, and typed tuples with arity checks.
- What you can do after
- Evaluate whether functions and tuple values provide the required number of parameters or elements.
Read how Functional Programming in JavaScript explains arity →
Elixir in Action, Third Edition
Arity is the number of arguments that a function receives.
- How it is used
- Distinguishes functions with the same name and supports concise interfaces through default arguments.
- How deep it goes
- Explains function identity, delegation, generated arities, and the boundary against variable-argument functions.
- Examples
- Uses Rectangle.area, Calculator.add, Enum.each, and one-arity and three-arity lambdas.
- What you can do after
- Apply arity notation and default-argument definitions when designing and calling Elixir functions.
The Well-Grounded Rubyist, Fourth Edition
Arity is the number of arguments that a callable Ruby object or method accepts according to its argument rules.
- How it is used
- Distinguishes strict method calls from flexible Proc calls and enables staged argument application through curry.
- How deep it goes
- Explains strict and permissive argument rules, then applies arity to currying, partial application, splat arguments, and method conversion.
- Examples
- Uses permissive Proc calls, curried addition, staged calls, and reusable functions for selecting array multiples.
- What you can do after
- Apply arity by choosing Proc or lambda behavior and by building reusable functions with curry.
Read how The Well-Grounded Rubyist, Fourth Edition explains arity →
Building User-Friendly DSLs
The number of subexpressions or operands that an expression concept instance can contain.
- How it is used
- Characterizes expression concepts and their AST objects by counting contained subexpressions or operands.
- How deep it goes
- Defines arity, excludes non-operand properties, and connects positive arity to recursive AST construction and compositionality.
- Examples
- Uses literals, unary negation, binary multiplication, ternary conditionals, function calls, and arrays to illustrate common arities.
- What you can do after
- Evaluate/understand how expression concepts compose into larger ASTs and why a small set of concepts can provide broad expressiveness.
What to know first
- missing valueA missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
- symbolA symbol is a name or sign that represents or identifies a value, entity, operation, or concept within a notation or system.
Related concepts
- expressionmeasures · An expression is a syntactically formed combination of values, names, operators, or other terms that denotes or evaluates to a value or result.
- functionconfigures · A function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- curryingaddressed by · Currying is the transformation of a function that accepts multiple arguments into a sequence of functions that accept arguments incrementally, typically one at a time.
- lambdameasures · A lambda is an expression that defines an unnamed function, specifying its parameters and body and producing a callable value.
- type compatibilityequivalent to · Type compatibility is the relationship in which values of one type can be used where another type is expected under applicable language rules.
Questions about arity
What is arity?
Arity is the number of arguments or operands an operation accepts.
Which Manning books explain arity?
Clojure: The Essential Reference, Functional Programming in JavaScript, Elixir in Action, Third Edition, The Well-Grounded Rubyist, Fourth Edition and Building User-Friendly DSLs.
What should I know before learning arity?
Manning books that teach arity usually introduce missing value and symbol first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




