Skip to content

EitherTuple5Ops<E, T1, T2, T3, T4, T5>

extensionEitherTuple5Ops<E, T1, T2, T3, T4, T5>onEither<E,Record>

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

Methods

ensureN() extension

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

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

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

filterOrElseN() extension

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

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

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

flatMapN() extension

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

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

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

foldN() extension

T6foldN<T6>(T6Function(E)f,T6Function(T1,T2,T3,T4,T5)g,);

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

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

foreachN() extension

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

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

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

mapN() extension

Either<E,T6>mapN<T6>(T6Function(T1,T2,T3,T4,T5)f,);

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

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