Arity

Published: 1/18/2020
Last edited: 1/26/2020

The number of parameters a function takes.

// each of these is a number in ordinal form
const nullary = () => {}
const unary = x => x
const binary = (a, b) => [a, b]
const ternary = (a, b, c) => ({a, b, c})
const quaternary = (a, b, c, d) => "the name of 5 parameters is toomanyary"
Published: 1/18/2020
Last edited: 1/26/2020
See this page on Github
Built with 💛 by Open Sorcerers
Created with Gatsby using the 😎 foresight starter