All challenges
JavaScript challenge · Frontend
Curry
Difficulty
medium
Time
~20m
Format
Single
Grading
Auto-graded
#frontend#javascript#typescript#functions#closures
Mission file // read carefullymedium
Implement curry(fn) returning a curried version of fn. It collects arguments across calls until at least fn.length are supplied, then invokes fn. Partial applications must be reusable and independent.
const sum = (a, b, c) => a + b + c;
curry(sum)(1)(2)(3); // 6
curry(sum)(1, 2)(3); // 6
Build with
TypeScriptJavaScript
Hidden test suite
Auto-graded on submit
Start challenge
Sign in to save your progress.