Parameters
Rest
...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E), ((v: E) => F), ((v: F) => G), ((v: G) => H), ((v: H) => I), ((v: I) => J)]
Returns ((a: A) => J)
A function taking the same type as the first input function,
returning the same type as the last input function.
Compose a series of single-argument functions/operators in application order. (This is basically a deferred version of pipe().) For example:
As with
pipe()
, the declared typings only support composing up to 9 functions at once; if you need more you'll need to nest calls tocompose()
(i.e. passing the result of acompose()
as an argument to anothercompose()
call.)