zip<U> abstract method
Returns a tuple of both this
and other
if both are Some, or None otherwise.
Examples
// prints "Some((2, some))"
print(const Some(2).zip(const Some('some')));
// prints "None"
print(const Some(2).zip(const None<String>()));
Implementation
@useResult
Option<(T, U)> zip<U>(Option<U> other);