valueOr method

T valueOr(
  1. T fallback
)

Returns the value if present, otherwise returns fallback.

Implementation

T valueOr(T fallback) => switch (this) {
  Some(:final value) => value,
  None() => fallback,
};