flow<A, B, C, D>(f1: ((...xs: A) => B), f2: ((x: B) => C), f3: ((x: C) => D)): ((...xs: A) => D)
Similar to pipe, except that it returns a function which takes as its parameter
the initial value for the pipe in order to support point-free style. Though point-free style
can make for concise code, be aware that type-inference for flow may be less robust than for pipe
due to its data-last form.
Remarks
The implementation contains types to support up to twelve transformations.
All overload signatures follow the same pattern as the representative form shown
here.
Similar to pipe, except that it returns a function which takes as its parameter the initial value for the pipe in order to support point-free style. Though point-free style can make for concise code, be aware that type-inference for
flow
may be less robust than forpipe
due to its data-last form.Remarks
The implementation contains types to support up to twelve transformations. All overload signatures follow the same pattern as the representative form shown here.
Example