or method

Option<T> or(
  1. Option<T> optb
)
inherited

Returns the option if it contains a value, otherwise returns optb.

Implementation

Option<T> or(Option<T> optb) {
  return isSome() ? this as Some<T> : optb;
}