2632.js (254B)
1 /** 2 * @param {Function} fn 3 * @return {Function} 4 */ 5 6 var curry = function(fn) { 7 return function curried(...args) { 8 if(args.length >= fn.length) 9 return fn(...args); 10 return (...nextArgs) => curried(...args, ...nextArgs); 11 }; 12 };