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