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) { } }) } }