Skip to content

IOTuple2Ops<T1, T2>

extension IOTuple2Ops<T1, T2> on IO<Record>

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

Methods

flatMapN() extension

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

Available on IO<A>, provided by the IOTuple2Ops<T1, T2> extension

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

flatTapN() extension

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

Available on IO<A>, provided by the IOTuple2Ops<T1, T2> extension

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

mapN() extension

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

Available on IO<A>, provided by the IOTuple2Ops<T1, T2> extension

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