题解 | #柯里化#
柯里化
https://www.nowcoder.com/practice/bb78d69986794470969674a8b504ac00
function curryIt(fn) { let args=[] const fnn= (arg)=>{ args.push(arg) if(args.length===3){ return fn(...args) }else{ return fnn } } return fnn }
柯里化
https://www.nowcoder.com/practice/bb78d69986794470969674a8b504ac00
function curryIt(fn) { let args=[] const fnn= (arg)=>{ args.push(arg) if(args.length===3){ return fn(...args) }else{ return fnn } } return fnn }
相关推荐