map2<C, D> method

  1. @override
Option<D> map2<C, D>(
  1. covariant Option<C> mc,
  2. D f(
    1. T t,
    2. C c
    )
)
override

Change type of this Option based on its value of type T and the value of type C of another Option.

Implementation

@override
Option<D> map2<C, D>(covariant Option<C> mc, D Function(T t, C c) f) =>
    flatMap((a) => mc.map((c) => f(a, c)));