UNPKG

ramda-extension

Version:

Helpful functions built on top of the mighty Ramda

19 lines (18 loc) 416 B
import { reduce, call } from 'ramda'; /** * Call function passed as first argument with arguments determined by second parameter in order. * * @func * @category Function * * @sig (a → ... → b) → [a, ..., b] → c * * @example * * const f = (a) => (b) => a + b * * R_.reduceCallable(f, [1, 2]) // 3 * */ var reduceCallable = /*#__PURE__*/reduce(call); export default reduceCallable;