From d031d7f9c526a7ff52f335d9d9ed8c2d67abd19f Mon Sep 17 00:00:00 2001 From: Sebastian Lorenz Date: Wed, 30 Aug 2023 16:18:38 +0200 Subject: [PATCH] fix `Effect.forEach` usage (#164) --- src/internal/sink.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/sink.ts b/src/internal/sink.ts index 3bdc03b..91f217e 100644 --- a/src/internal/sink.ts +++ b/src/internal/sink.ts @@ -377,7 +377,7 @@ export const contramapEffect = dual< self, (chunk) => Effect.map( - Effect.forEach(chunk, f), + Effect.forEach(chunk, (v) => f(v)), Chunk.unsafeFromArray ) ) @@ -1375,7 +1375,7 @@ export const flatMap = dual< export const forEach = (f: (input: In) => Effect.Effect): Sink.Sink => { const process: Channel.Channel, unknown, E, never, void> = core.readWithCause({ onInput: (input: Chunk.Chunk) => - pipe(core.fromEffect(Effect.forEach(input, f, { discard: true })), core.flatMap(() => process)), + pipe(core.fromEffect(Effect.forEach(input, (v) => f(v), { discard: true })), core.flatMap(() => process)), onFailure: core.failCause, onDone: () => core.unit })