valueOr method
- T fallback
Returns the value if present, otherwise returns fallback.
Implementation
T valueOr(T fallback) => switch (this) {
Some(:final value) => value,
None() => fallback,
};
Returns the value if present, otherwise returns fallback.
T valueOr(T fallback) => switch (this) {
Some(:final value) => value,
None() => fallback,
};