This commit is contained in:
Ruidy 2022-07-08 13:06:25 +02:00
parent 80ba9ff8c1
commit 745cfc6eee

View file

@ -87,12 +87,12 @@ __Table of Contents__
The number of arguments a function takes. From words like unary, binary, ternary, etc. The number of arguments a function takes. From words like unary, binary, ternary, etc.
```js ```go
const sum = (a, b) => a + b sum := func (a, b int) { return a + b}
// The arity of sum is 2 (binary) // The arity of sum is 2 (binary)
const inc = a => a + 1 inc := func (a int) { return a + 1}
// The arity of inc is 1 (unary) // The arity of inc is 1 (unary)
const zero = () => 0 zero := func () { return 0}
// The arity of zero is 0 (nullary) // The arity of zero is 0 (nullary)
``` ```