map<U> method
Maps the success value using the given function, preserving failures
Implementation
Result<U, E> map<U>(U Function(T) mapper) => switch (this) {
Success(value: final value) => Result.success(mapper(value)),
Failure(error: final error) => Result.failure(error),
};