unwrapOrElse method
T
unwrapOrElse(
- T f(
- E error
Returns the inner value or computes one via f.
Implementation
T unwrapOrElse(T Function(E error) f) {
final self = this;
if (self is Ok<T, E>) return self.value;
return f((self as Err<T, E>).error);
}