Signature:
trait Stream[R, E, A] {
def mapAsync(n: Int)(f: A => ZIO[R1, E1, B]): Stream[R1, E1, B]
def mapAsyncUnordered(n: Int)(f: A => ZIO[R1, E1, B]): Stream[R1, E1, B]
}
The first should execute up to n transformations in parallel and emit elements in the same order. The second is identical but can emit elements in the order of completion of f invocations.
Also, possible aliases: mapMPar, mapMParUnordered
I'll give it a try. :)
Most helpful comment
I'll give it a try. :)