函数式编程——柯里化 发表于 2018-05-24 123456function curry(fn) { const g = (...allArgs) => allArgs.length >= fn.length ? fn(...allArgs) : (...args) => g(...allArgs, ...args); return g;}