MCPcopy Index your code
hub / github.com/Effect-TS/effect / forEach

Function forEach

packages/effect/src/internal/sink.ts:1345–1353  ·  view source on GitHub ↗
(f: (input: In) => Effect.Effect<X, E, R>)

Source from the content-addressed store, hash-verified

1343
1344/** @internal */
1345export const forEach = <In, X, E, R>(f: (input: In) => Effect.Effect<X, E, R>): Sink.Sink<void, In, never, E, R> => {
1346 const process: Channel.Channel<never, Chunk.Chunk<In>, E, E, void, unknown, R> = core.readWithCause({
1347 onInput: (input: Chunk.Chunk<In>) =>
1348 pipe(core.fromEffect(Effect.forEach(input, (v) => f(v), { discard: true })), core.flatMap(() => process)),
1349 onFailure: core.failCause,
1350 onDone: () => core.void
1351 })
1352 return new SinkImpl(process)
1353}
1354
1355/** @internal */
1356export const forEachChunk = <In, X, E, R>(

Callers 9

hashMap.tsFile · 0.70
fiberRuntime.tsFile · 0.70
allValidateFunction · 0.70
allEitherFunction · 0.70
allFunction · 0.70
fiberAwaitAllFunction · 0.70
hashSet.tsFile · 0.70
tSet.tsFile · 0.50
stm.tsFile · 0.50

Calls 3

fromEffectMethod · 0.80
pipeFunction · 0.70
fFunction · 0.50

Tested by

no test coverage detected