curry
Call Signature
Section titled “Call Signature”curry<
A,B,C>(f,arity?): (a) => (b) =>C
Defined in: Composition/curry.ts:26
Converts a 2-, 3-, or 4-argument function into a curried function.
The inverse of uncurry.
Arity is read from Function.prototype.length. Functions with rest or default parameters report
an unreliable length, so pass the intended arity explicitly. Only arities 2, 3, and 4 are
supported; any other inferred arity throws instead of invoking the function early.
Type Parameters
Section titled “Type Parameters”A
B
C
Parameters
Section titled “Parameters”(a, b) => C
arity?
Section titled “arity?”2
Returns
Section titled “Returns”(a) => (b) => C
Example
Section titled “Example”uncurry for the inverse operation
Call Signature
Section titled “Call Signature”curry<
A,B,C,D>(f,arity?): (a) => (b) => (c) =>D
Defined in: Composition/curry.ts:27
Converts a 2-, 3-, or 4-argument function into a curried function.
The inverse of uncurry.
Arity is read from Function.prototype.length. Functions with rest or default parameters report
an unreliable length, so pass the intended arity explicitly. Only arities 2, 3, and 4 are
supported; any other inferred arity throws instead of invoking the function early.
Type Parameters
Section titled “Type Parameters”A
B
C
D
Parameters
Section titled “Parameters”(a, b, c) => D
arity?
Section titled “arity?”3
Returns
Section titled “Returns”(a) => (b) => (c) => D
Example
Section titled “Example”uncurry for the inverse operation
Call Signature
Section titled “Call Signature”curry<
A,B,C,D,E>(f,arity?): (a) => (b) => (c) => (d) =>E
Defined in: Composition/curry.ts:28
Converts a 2-, 3-, or 4-argument function into a curried function.
The inverse of uncurry.
Arity is read from Function.prototype.length. Functions with rest or default parameters report
an unreliable length, so pass the intended arity explicitly. Only arities 2, 3, and 4 are
supported; any other inferred arity throws instead of invoking the function early.
Type Parameters
Section titled “Type Parameters”A
B
C
D
E
Parameters
Section titled “Parameters”(a, b, c, d) => E
arity?
Section titled “arity?”4
Returns
Section titled “Returns”(a) => (b) => (c) => (d) => E
Example
Section titled “Example”uncurry for the inverse operation