Implement `curry(fn)`, which returns a curried version of `fn`. The curried function should keep returning a new function until at least as many arguments as `fn` declares (`fn.length`) have been supplied, then call `fn` with all of them. It must support any split of arguments: `add(1)(2)(3)`, `add(1, 2)(3)`, and `add(1)(2, 3)` should all work.
+ 2 hidden tests run on Submit.
Currying relies on a closure that remembers the arguments gathered so far. Each call checks whether enough arguments exist to satisfy the original function's arity; if not, it returns another collector closure. Once the threshold is met, the original function runs with the full argument list.
Run your code to see results.