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