unwrapOrElse method
T
unwrapOrElse(
- T f()
Returns the option if it contains a value, otherwise returns other.
Implementation
T unwrapOrElse(T Function() f) {
return switch (this) {
Some(:final v) => v,
_ => f(),
};
}