/** * Like `Stream.forEach`, but returns an `Effect` so the finalization * order can be controlled. * * @tsplus static effect/core/stream/Stream.Aspects runForEachScoped * @tsplus pipeable effect/core/stream/Stream runForEachScoped */ export function runForEachScoped( f: (a: A) => Effect ) { return (self: Stream): Effect => self.runScoped(Sink.forEach(f)) }