( self: Iterable<A>, f: (a: A, i: number) => Effect.Effect<B, E, R>, batching: boolean )
| 2178 | |
| 2179 | /* @internal */ |
| 2180 | export const forEachParUnbounded = <A, B, E, R>( |
| 2181 | self: Iterable<A>, |
| 2182 | f: (a: A, i: number) => Effect.Effect<B, E, R>, |
| 2183 | batching: boolean |
| 2184 | ): Effect.Effect<Array<B>, E, R> => |
| 2185 | core.suspend(() => { |
| 2186 | const as = RA.fromIterable(self) |
| 2187 | const array = new Array<B>(as.length) |
| 2188 | const fn = (a: A, i: number) => core.flatMap(f(a, i), (b) => core.sync(() => array[i] = b)) |
| 2189 | return core.zipRight(forEachConcurrentDiscard(as, fn, batching, false), core.succeed(array)) |
| 2190 | }) |
| 2191 | |
| 2192 | /** @internal */ |
| 2193 | export const forEachConcurrentDiscard = <A, X, E, R>( |
no test coverage detected