or method

Option<T> or(
  1. Option<T> other
)

Returns the option if it contains a value, otherwise returns other

Implementation

Option<T> or(Option<T> other) {
  if (isSome()) {
    return this;
  }
  return other;
}