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