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