leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE |

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 };