Tuple2EitherOps<E, T1, T2> extension

Provides additional functions on tuple with 2 Eithers.

on

Properties

tupled Either<E, (T1, T2)>

Available on (Either<E, T1>, Either<E, T2>), provided by the Tuple2EitherOps extension

If all items of this tuple are a Right, the respective items are turned into a tuple and returned as a Right. If any item is a Left, the first Left encountered is returned.
no setter

Methods

mapN<T3>(Function2<T1, T2, T3> fn) Either<E, T3>

Available on (Either<E, T1>, Either<E, T2>), provided by the Tuple2EitherOps extension

Applies fn to the values of each respective tuple member if all values are a Right. If any item is a Left, the first Left encountered will be returned.