Implement a function curry(fn) that transforms a function which takes multiple arguments into a function that can be repeatedly called with any number of arguments until all arguments are provided.
The function should:
Example
function sum(a, b, c) { return a + b + c; } const curried = curry(sum); curried(1)(2)(3); // 6 curried(1, 2)(3); // 6 curried(1)(2, 3); // 6
JavaScript Function
No test results yet
Click "Run" to execute tests