index.js 290 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 export default function convertToFP(fn, arity, a) { a = a || []; if (a.length >= arity) { return fn.apply(null, a.slice(0, arity).reverse()); } return function () { var args = Array.prototype.slice.call(arguments); return convertToFP(fn, arity, a.concat(args)); }; }