zip<U> method

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

Zips this Option with another Option, returning a Record of their held values.

Returns:

See: OptionUnzip.unzip() for reversing this operation.

See also: Rust: Option::zip()

Implementation

Option<(T, U)> zip<U>(Option<U> other) => switch ((this, other)) {
	(Some(value: T a), Some(value: U b)) => Some((a, b)),
	_ => None()
};