bimap<L2, R2> method

  1. @override
Either<L2, R2> bimap<L2, R2>(
  1. L2 ifLeft(
    1. L left
    ),
  2. R2 ifRight(
    1. R right
    )
)
override

Applies ifLeft or ifRight and returns a new Either with mapped values.

Implementation

@override
Either<L2, R2> bimap<L2, R2>(
  L2 Function(L left) ifLeft,
  R2 Function(R right) ifRight,
) {
  return Right<L2, R2>(ifRight(value));
}