Used in a Sentence

arity

Definitions, parts of speech, synonyms, and sentence examples for arity.

Editorial note

The arity of a field (value, array [and its arity], list) is not part of the hash of a message definition.

Examples14
Definitions3
Parts of speech1

Quick take

(mathematics, computer science) The maximum number of child nodes that any node in a given tree (data structure) may have.

Meaning at a glance

The clearest senses and uses of arity gathered in one view.

noun

(mathematics, computer science) The maximum number of child nodes that any node in a given tree (data structure) may have.

noun

(logic, mathematics, computer science) The number of arguments or operands a function or operation takes. For a relation, the number of domains in the corresponding Cartesian product.

noun

(Lojban grammar) the number of arguments (in Lojban grammar called sumti) specified in the definition of a selbri. (the selbri combined with the sumti make up a bridi).

Definitions

Core meanings and parts of speech for arity.

noun

(mathematics, computer science) The maximum number of child nodes that any node in a given tree (data structure) may have.

noun

(logic, mathematics, computer science) The number of arguments or operands a function or operation takes. For a relation, the number of domains in the corresponding Cartesian product.

noun

(Lojban grammar) the number of arguments (in Lojban grammar called sumti) specified in the definition of a selbri. (the selbri combined with the sumti make up a bridi).

Example sentences

1

The arity of a field (value, array [and its arity], list) is not part of the hash of a message definition.

2

Semicolons separate partial definitions for a single function of a single arity, and periods end those definitions.

3

First, recur is annoying because functions can have multiple arities, but you can only recur to the same arity.

4

For better or for worse, muti-arity overloading that doesn't just do partial application is a big part of modern Clojure.

5

Functions of different arities aren't even type-differentiable (although arity is available as a reflectable value).

6

So things like calling a function with the wrong arity, and calling a variable/function that doesn't exist are caught at compile time.

7

List processing via variadic arity functions is an explicit feature of Perl.

8

But if the choice is between multiple returns (which I guess is just two values?) and tuples, then I don't see why the common case (2-arity) can't be easily supported.

9

Unless your operators don't have a fixed arity, anyhow (Lisp's don't).

10

Sadly somebody forgot to keep the arity (variable/tuple/list) in there.

11

What I was having trouble understanding was why it was being used; specifically, why 'but' would have a strict arity of one in the first place, and why a second function (specifying arity) would be necessary.

12

I think in Erlang the function identification is the name and the arity and this is as close I know of what you would like to have.

Quote examples

1

Yet it seems that somehow if I have a bone to pick with Go not being able to dispatch functions by argument or arity, or with how its simplicity ends up with codebases a lot of people would consider much more verbose than necessary, it's just that I don't "get it".

2

This actually isn't an issue most of the time; since functions' APIs vary so much already (arity, return values, types, etc.) (defmacro unless (condition branch) `(if,condition nil,branch));; Works (unless keep (delete-file "foo.txt")) - Do everything with syntax rewriting!

Frequently asked questions

Short answers drawn from the clearest meanings and examples for this word.

How do you use arity in a sentence?

The arity of a field (value, array [and its arity], list) is not part of the hash of a message definition.

What does arity mean?

(mathematics, computer science) The maximum number of child nodes that any node in a given tree (data structure) may have.

What part of speech is arity?

arity is commonly used as noun.