mapRight<R2> method

Either<L, R2> mapRight<R2>(
  1. R2 combiner(
    1. R right
    )
)

Maps the right value, leaving the left value unchanged.

Implementation

Either<L, R2> mapRight<R2>(R2 Function(R right) combiner) {
  return fold(
    (left) => Left<L, R2>(left),
    (right) => Right<L, R2>(combiner(right)),
  );
}