const compose = (...fns) => value => fns.reverse().reduce((acc, fn) => fn(acc), value)
compose(
    third,
    second,
    first
)("test")
//等于
third(second(first(test)))

  

 posted on 2019-03-28 13:56  落逸  阅读(102)  评论(0编辑  收藏  举报