function compose(...fns) { // todo: // 只能使用reduce let arr = [...fns].reduce((pre, cur) => { pre.push(cur) return pre }, []) return function a(props) { arr.forEach((item) => { try { item.call(null, props) } catch (e) { } }) } }

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务