zip<U> method

Option<Tuple2<T, U>> zip<U>(
  1. Option<U> other
)

Zips this with another Option.

If this is Some(t) and other is Some(o), this method returns Some(Tuple2(t, o)). Otherwise, None is returned.

Implementation

Option<Tuple2<T, U>> zip<U>(Option<U> other) => isSome && other.isSome
    ? Some(Tuple2(_someValue, other.unwrap()))
    : None<Tuple2<T, U>>();