map4<L, A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E> static method
Either<L, E>
map4<
L, A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E>( - Either<L, A2> fa,
- Either<L, B2> fb,
- Either<L, C2> fc,
- Either<L, D2> fd,
- E fun(
- A a,
- B b,
- C c,
- D d,
),
)
Implementation
static Either<L, E> map4<L, A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E>(Either<L, A2> fa, Either<L, B2> fb, Either<L, C2> fc, Either<L, D2> fd, E fun(A a, B b, C c, D d)) =>
fa.fold(left, (a) => fb.fold(left, (b) => fc.fold(left, (c) => fd.fold(left, (d) => right(fun(a, b, c, d))))));