pipe4<A, B, C, D> function

D pipe4<A, B, C, D>(
  1. A a,
  2. B ab(
    1. A
    ),
  3. C bc(
    1. B
    ),
  4. D cd(
    1. C
    )
)

Transforms the input a by applying the function ab, then bc and then cd.

Implementation

D pipe4<A, B, C, D>(A a, B Function(A) ab, C Function(B) bc, D Function(C) cd) {
  return cd(bc(ab(a)));
}