function curryIt(fn) { let args=[] return (a)=>{ args.push(a) return (b)=>{ args.push(b) return (c)=>{ args.push(c) return fn(...args) } } } }