map<U> method
Transforms the contained value, if any, by applying map to it.
Examples
// prints "Ok(4)"
print(const Ok<int, String>(2).map((value) => value * 2));
// prints "Err(error)"
print(const Err<int, String>('error').map((value) => value * 2));
Implementation
@override
@useResult
Err<U, E> map<U>(U Function(T value) map) => Err(error);