函数柯里化

function curry(fun) {

    console.log(arguments.length);

    return function judgeCurry(...args) {

        return fun.length > args.length ?

        (...arg1) => judgeCurry(...args,...arg1):

        fun(...args);

    }

}

你可能感兴趣的:(函数柯里化)