zipWith<U, R> method

  1. @override
Option<R> zipWith<U, R>(
  1. Option<U> other,
  2. R f(
    1. T p1,
    2. U p2
    )
)
override

Zips self and another Option with function f

Implementation

@override
Option<R> zipWith<U, R>(Option<U> other, R Function(T p1, U p2) f) {
  if (other.isSome()) {
    return Some(f(v, other.unwrap()));
  }
  return None;
}