_createPartialApplicator.js 307 B

123456789
  1. import _arity from "./_arity.js";
  2. import _curry2 from "./_curry2.js";
  3. export default function _createPartialApplicator(concat) {
  4. return _curry2(function (fn, args) {
  5. return _arity(Math.max(0, fn.length - args.length), function () {
  6. return fn.apply(this, concat(args, arguments));
  7. });
  8. });
  9. }