Currying is the technique of converting a function that takes multiple arguments into a sequence of functions that each take a single argument.
Implement curry(fn) to return a curried version of fn. Collect one argument at a time until at least fn.length arguments have been provided, then call fn with the collected arguments.
Each call contributes at most its first argument; additional arguments passed in the same call are ignored. Calls with no arguments should also be ignored and return another function, while an explicit undefined counts as an argument. Preserve the this value from the first call in the chain when fn is finally invoked.