unwrapOrElse method
Returns the contained Ok
(success) value
or computes it from the closure.
Examples
Basic usage:
int count(String x) => x.length;
expect(Ok<int, String>(2).unwrapOrElse(count), 2);
expect(Errint, String>('foo').unwrapOrElse(count), 3);
Implementation
@override
T unwrapOrElse(T Function(E error) fallback) {
return v;
}