map<R2> method
Maps the right value if this is a Right, otherwise returns this Left unchanged
Implementation
Either<L, R2> map<R2>(R2 Function(R) f) {
return switch (this) {
Left() => this as Either<L, R2>,
Right(:final value) => Right(f(value)),
};
}