Skip to content

tuple

tuple<Args, R>(f): (args) => R

Defined in: Composition/fn.ts:161

Converts a function taking multiple arguments into a function taking a single tuple argument.

Args extends readonly unknown[]

R

(…args) => R

(args) => R

const add = (a: number, b: number) => a + b;
const addTuple = tuple(add);
addTuple([2, 3]); // 5