map3K<A, B, C, R> function
A wrapper around map3, useful for chaining. The remaining Option's are passed as arguments.
expect(
some(1)
.chain(map2K(some(2), some(3), (a, int b, int c) => a + b + c)),
some(6),
);
expect(
some(1)
.chain(map2K(some(2), none(), (a, int b, int c) => a + b + c)),
none(),
);
Implementation
Option<R> Function(Option<A> optionA) map3K<A, B, C, R>(
Option<B> optionB,
Option<C> optionC,
R Function(A a, B b, C c) f,
) =>
(optionA) => map3(f)(optionA, optionB, optionC);