Word of the Day: arity

Here’s a new word for me:

Arity—In a computer programming language, the number of arguments a function or operation accepts. For example, public void FindUser(string FirstName, string LastName) has an arity of two.

I discovered this word recently as I began exploring Prolog. In most programming languages I’ve worked with, the numerical value of an operation’s arity isn’t emphasized. In the Prolog world—in documentation, discussion and in the interpreter’s output— predicate names are always coupled with their arity. For example: reverseList(In, Out) is referred to as reverseList/2 (with the ”/2″ indicating an arity of two).

More Details on Arity

Leave a Reply

Your email address will not be published. Required fields are marked *