flatMap2<B> method

ZIO<R, E, (A, B)> flatMap2<B>(
  1. ZIO<R, E, B> f(
    1. A _
    )
)

A variant of flatMap that zip's the result of this ZIO with the result of the given ZIO, returning a record of the results.

Implementation

ZIO<R, E, (A, B)> flatMap2<B>(
  ZIO<R, E, B> Function(A _) f,
) =>
    flatMap((a) => f(a).map((b) => (a, b)));