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