zipWith<U, R> method
- @override
- @useResult
- Option<
U> other, - R zip(
- T value,
- U otherValue
override
Returns the result of zip
called with both this
and other
if both are Some, or None
otherwise.
Examples
// prints "Some((2, some))"
print(const Some(2).zipWith(const Some('some'), (a, b) => (a, b)));
// prints "None"
print(const Some(2).zipWith(const None<String>(), (a, b) => (a, b)));
Implementation
@override
@useResult
None<R> zipWith<U, R>(Option<U> other, R Function(T value, U otherValue) zip) => None<R>();