// ets_tracing: off import type * as CK from "../../../../Collections/Immutable/Chunk/index.js" import type * as T from "../../../../Effect/index.js" import type * as M from "../../../../Managed/index.js" import * as SK from "../../Sink/index.js" import type * as C from "../core.js" import * as RunManaged from "./runManaged.js" /** * Like `Stream#forEachChunk`, but returns a `Managed` so the finalization order * can be controlled. */ export function runForEachChunkManaged_( self: C.Stream, f: (c: CK.Chunk) => T.Effect ): M.Managed { return RunManaged.runManaged_(self, SK.forEachChunk(f)) } /** * Like `Stream#forEachChunk`, but returns a `Managed` so the finalization order * can be controlled. */ export function runForEachChunkManaged( f: (c: CK.Chunk) => T.Effect ) { return (self: C.Stream) => runForEachChunkManaged_(self, f) }