map<U> method
Maps a Result<T, E>
to Result<U, E>
by applying a function to a
contained Ok value, leaving an Err value untouched.
This function can be used to compose the results of two functions.
Implementation
Result<U, E> map<U>(U Function(T value) op) =>
isOk ? Ok(op(_okValue)) : Err(_errValue);