pipe3<S, T, U, V> function

Func1<S, V> pipe3<S, T, U, V>(
  1. Func1<S, T> f1,
  2. Func1<T, U> f2,
  3. Func1<U, V> f3
)

Performs left-to-right function composition.

final pipe = pipe3(
  double.parse,
  (double v) => v.floor(),
  (int v) => v.toString(),
);
pipe('123.456') // '123'

Implementation

Func1<S, V> pipe3<S, T, U, V>(Func1<S, T> f1, Func1<T, U> f2, Func1<U, V> f3) =>
    (S value) => f3(f2(f1(value)));