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