map2<T1, U> method

Optional<U> map2<T1, U>(
  1. Optional<T1> other,
  2. U f(
    1. T,
    2. T1
    )
)

Implementation

Optional<U> map2<T1, U>(
  Optional<T1> other,
  U Function(T, T1) f,
) =>
    flatMap(
      (value) => other.map(
        (value1) => f(value, value1),
      ),
    );