andThen<U> method
Returns the result of calculateOther
if this
is an Ok, or an Err of the original error
otherwise.
Examples
// prints "Ok(3)"
print(const Ok<int, String>(2).andThen((value) => const Ok(3)));
// prints "Err(error)"
print(const Err<int, String>('error').andThen((value) => const Ok(3)));
Implementation
@override
@useResult
Result<U, E> andThen<U>(Result<U, E> Function(T value) calculateOther) => calculateOther(value);