WordGarden.io

arity

Rare

Pronunciation

UK

    US

      Meanings

      Noun

      1. the number of arguments or inputs that a function, operator, relation, or predicate takes

      Beyond the definition

      Imagine you're building with LEGO bricks. Some pieces only connect to one other piece—they have an "arity" of one. Others snap together with two, three, or even four. In math and computer science, "arity" describes the number of inputs (arguments/operands) a function or operation needs to work. A plus sign (+) is usually treated as a binary operator: it has an arity of two because it combines two numbers (like 2+32 + 3). Unary minus (as in −5-5) has an arity of one because it takes a single input. So, arity is all about how many things something "wants" to operate on.

      Examples

      1. 1

        Programming languages

        In this language, every function has an arity, so the compiler can check your calls.

      2. 2

        Operators

        The `+` operator usually has an arity of two, but some languages also allow a one-argument version.

      3. 3

        Function arguments

        Our parser handles both fixed-arity and variable-arity functions.

        • Domain

          in programming, variable-arity functions can take different numbers of arguments

      See also

      Similar

      • adicity
      • argument count

      Shades of meaning

      • number of operands
      • number of parameters

      Contrast

      • variadic

      Do not confuse

      Used with (collocations)

      • function arity
      • operator arity
      • arity of a relation

      Explore

      Forms and spellings

      1 form open this card.

      Main spelling

      • aritynoun