okOrElse<E extends Object> method
Result<T, E>
okOrElse<E extends Object>(
- E errFn()
Transforms the Option
Implementation
@pragma("vm:prefer-inline")
Result<T, E> okOrElse<E extends Object>(E Function() errFn) {
if (v == null) {
return Err(errFn());
} else {
return Ok(v!);
}
}