map<R> method
Transform the value if successful, or return the failure
Implementation
RxResult<R> map<R>(R Function(T value) transform) {
return switch (this) {
RxSuccess<T> success => RxResult.success(transform(success.value)),
RxFailure<T> failure => RxResult.failure(failure.error),
};
}