UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

8 lines (6 loc) 194 B
export function ap(functions, input){ if (arguments.length === 1){ return _inputs => ap(functions, _inputs) } return functions.reduce((acc, fn) => [ ...acc, ...input.map(fn) ], []) }