( self: Iterable<A>, f: (a: A, i: number) => Effect.Effect<B, E, R>, batching: boolean )
| 2188 | |
| 2189 | /* @internal */ |
| 2190 | export const forEachParUnbounded = <A, B, E, R>( |
| 2191 | self: Iterable<A>, |
| 2192 | f: (a: A, i: number) => Effect.Effect<B, E, R>, |
| 2193 | batching: boolean |
| 2194 | ): Effect.Effect<Array<B>, E, R> => |
| 2195 | core.suspend(() => { |
| 2196 | const as = RA.fromIterable(self) |
| 2197 | const array = new Array<B>(as.length) |
| 2198 | const fn = (a: A, i: number) => core.flatMap(f(a, i), (b) => core.sync(() => array[i] = b)) |
| 2199 | return core.zipRight(forEachConcurrentDiscard(as, fn, batching, false), core.succeed(array)) |
| 2200 | }) |
| 2201 | |
| 2202 | /** @internal */ |
| 2203 | export const forEachConcurrentDiscard = <A, X, E, R>( |
no test coverage detected