UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

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) ], []) }