Skip to content

IOTuple4Ops<T1, T2, T3, T4>

extension IOTuple4Ops<T1, T2, T3, T4> on IO<Record>

Provides additional functions on an IO of a 4 element tuple.

Methods

flatMapN() extension

IO<T5> flatMapN<T5>(IO<T5> Function(T1, T2, T3, T4) f)

Available on IO<A>, provided by the IOTuple4Ops<T1, T2, T3, T4> extension

Implementation
dart
IO<T5> flatMapN<T5>(Function4<T1, T2, T3, T4, IO<T5>> f) => flatMap(f.tupled);

flatTapN() extension

IO<Record> flatTapN<T5>(IO<T5> Function(T1, T2, T3, T4) f)

Available on IO<A>, provided by the IOTuple4Ops<T1, T2, T3, T4> extension

Implementation
dart
IO<(T1, T2, T3, T4)> flatTapN<T5>(Function4<T1, T2, T3, T4, IO<T5>> f) => flatTap(f.tupled);

mapN() extension

IO<T5> mapN<T5>(T5 Function(T1, T2, T3, T4) f)

Available on IO<A>, provided by the IOTuple4Ops<T1, T2, T3, T4> extension

Implementation
dart
IO<T5> mapN<T5>(Function4<T1, T2, T3, T4, T5> f) => map(f.tupled);