flatMap<U> method
Maps Result<T, E> to Result<U, E>, leaving an Err
value untouched.
Allows chaining Results without nesting them.
Implementation
Result<U, E> flatMap<U>(Result<U, E> Function(T) f) =>
isOk ? f(_value) : Result.err(_error);