Transforms the value inside an Either using the provided function. If the Either is Right(value), returns Right(f(value)). If the Either is Left(value), returns Left(value).
Either
Right(value)
Right(f(value))
Left(value)
The function to apply to the Right value
Right
A function that transforms Either<E, A> to Either<E, B>
Either<E, A>
Either<E, B>
Transforms the value inside an
Either
using the provided function. If theEither
isRight(value)
, returnsRight(f(value))
. If theEither
isLeft(value)
, returnsLeft(value)
.