2632. Curry ¶ TypeScript 1 2 3 4 5 6 7function curry(fn: Function): Function { return function curried(...args: any[]): any { return args.length >= fn.length ? fn.apply(this, args) : curried.bind(this, ...args); }; }