Skip to content

untuple

untuple<Args, R>(f): (…args) => R

Defined in: Composition/fn.ts:173

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

Args extends readonly unknown[]

R

(args) => R

(…args) => R

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