Skip to content

EitherTuple3Ops<E, T1, T2, T3>

extensionEitherTuple3Ops<E, T1, T2, T3>onEither<E,Record>

Provides additional functions on an Either where the right value is a 3 element tuple.

Methods

ensureN() extension

Either<E,Record>ensureN(boolFunction(T1,T2,T3)p,EFunction()onFailure,);

Available on Either<A, B>, provided by the EitherTuple3Ops<E, T1, T2, T3> extension

Implementation
dart
Either<E, (T1, T2, T3)> ensureN(
  Function3<T1, T2, T3, bool> p,
  Function0<E> onFailure,
) => ensure(p.tupled, onFailure);

filterOrElseN() extension

Either<E,Record>filterOrElseN(boolFunction(T1,T2,T3)p,EFunction()zero,);

Available on Either<A, B>, provided by the EitherTuple3Ops<E, T1, T2, T3> extension

Implementation
dart
Either<E, (T1, T2, T3)> filterOrElseN(
  Function3<T1, T2, T3, bool> p,
  Function0<E> zero,
) => filterOrElse(p.tupled, zero);

flatMapN() extension

Either<E,T4>flatMapN<T4>(Either<E,T4>Function(T1,T2,T3)f,);

Available on Either<A, B>, provided by the EitherTuple3Ops<E, T1, T2, T3> extension

Implementation
dart
Either<E, T4> flatMapN<T4>(Function3<T1, T2, T3, Either<E, T4>> f) => flatMap(f.tupled);

foldN() extension

T4foldN<T4>(T4Function(E)f,T4Function(T1,T2,T3)g,);

Available on Either<A, B>, provided by the EitherTuple3Ops<E, T1, T2, T3> extension

Implementation
dart
T4 foldN<T4>(
  Function1<E, T4> f,
  Function3<T1, T2, T3, T4> g,
) => fold(f, g.tupled);

foreachN() extension

voidforeachN(voidFunction(T1,T2,T3)f)

Available on Either<A, B>, provided by the EitherTuple3Ops<E, T1, T2, T3> extension

Implementation
dart
void foreachN(Function3<T1, T2, T3, void> f) => foreach(f.tupled);

mapN() extension

Either<E,T4>mapN<T4>(T4Function(T1,T2,T3)f)

Available on Either<A, B>, provided by the EitherTuple3Ops<E, T1, T2, T3> extension

Implementation
dart
Either<E, T4> mapN<T4>(Function3<T1, T2, T3, T4> f) => map(f.tupled);