EitherTuple4Ops<E, T1, T2, T3, T4>
extension EitherTuple4Ops<E, T1, T2, T3, T4> on Either<E, Record>Provides additional functions on an Either where the right value is a 4 element tuple.
Methods
ensureN() extension
Either<E, Record> ensureN(
bool Function(T1, T2, T3, T4) p,
E Function() onFailure,
)Available on Either<A, B>, provided by the EitherTuple4Ops<E, T1, T2, T3, T4> extension
Implementation
dart
Either<E, (T1, T2, T3, T4)> ensureN(
Function4<T1, T2, T3, T4, bool> p,
Function0<E> onFailure,
) => ensure(p.tupled, onFailure);filterOrElseN() extension
Either<E, Record> filterOrElseN(
bool Function(T1, T2, T3, T4) p,
E Function() zero,
)Available on Either<A, B>, provided by the EitherTuple4Ops<E, T1, T2, T3, T4> extension
Implementation
dart
Either<E, (T1, T2, T3, T4)> filterOrElseN(
Function4<T1, T2, T3, T4, bool> p,
Function0<E> zero,
) => filterOrElse(p.tupled, zero);flatMapN() extension
Available on Either<A, B>, provided by the EitherTuple4Ops<E, T1, T2, T3, T4> extension
Implementation
dart
Either<E, T5> flatMapN<T5>(Function4<T1, T2, T3, T4, Either<E, T5>> f) => flatMap(f.tupled);foldN() extension
T5 foldN<T5>(T5 Function(E) f, T5 Function(T1, T2, T3, T4) g)Available on Either<A, B>, provided by the EitherTuple4Ops<E, T1, T2, T3, T4> extension
Implementation
dart
T5 foldN<T5>(
Function1<E, T5> f,
Function4<T1, T2, T3, T4, T5> g,
) => fold(f, g.tupled);foreachN() extension
void foreachN(void Function(T1, T2, T3, T4) f)Available on Either<A, B>, provided by the EitherTuple4Ops<E, T1, T2, T3, T4> extension
Implementation
dart
void foreachN(Function4<T1, T2, T3, T4, void> f) => foreach(f.tupled);mapN() extension
Either<E, T5> mapN<T5>(T5 Function(T1, T2, T3, T4) f)Available on Either<A, B>, provided by the EitherTuple4Ops<E, T1, T2, T3, T4> extension
Implementation
dart
Either<E, T5> mapN<T5>(Function4<T1, T2, T3, T4, T5> f) => map(f.tupled);