mapErr<F> method
Maps a Result<T, E>
to Result<T, F>
by applying a function to a
contained Err value, leaving an Ok value untouched.
This function can be used to pass through a successful result while handling an error.
Implementation
Result<T, F> mapErr<F>(F Function(E err) op) =>
isOk ? Ok(_okValue) : Err(op(_errValue));