zip<U extends Object> method

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

Zips self with another Option.

Implementation

@pragma("vm:prefer-inline")
Option<(T, U)> zip<U extends Object>(Option<U> other) {
  if (v == null) {
    return None;
  } else {
    if (other.isSome()) {
      return Some((v!, other.unwrap()));
    }
    return None;
  }
}