orElse<F> method
Calls op
if the result is Err, otherwise returns the Ok value of
this
.
This function can be used for control flow based on result values.
Implementation
Result<T, F> orElse<F>(Result<T, F> Function(E err) op) =>
isOk ? Ok(_okValue) : op(_errValue);