or method

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

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

Arguments passed to or are eagerly evaluated; if you are passing the result of a function call, it is recommended to use orElse, which is lazily evaluated.

Implementation

Option<T> or(Option<T> optb) => isSome ? Some(_someValue) : optb;