let currying = function(fn){ let stored_args = [].slice.call(arguments,1); console.log(stored_args);//截取第一个参数 return function(){ let args = stored_args.concat([].slice.call(arguments)); return fn.apply(null,args); } } function add(x,y){ return x+y; } let result = currying(add,5)(2); console.log(result);//7