import { constTrue } from "@tsplus/stdlib/data/Function" /** * Executes a pure fold over the stream of values - reduces all elements in * the stream to a value of type `S`. * * @tsplus static effect/core/stream/Stream.Aspects runFoldEffect * @tsplus pipeable effect/core/stream/Stream runFoldEffect */ export function runFoldEffect( s: S, f: (s: S, a: A) => Effect ) { return (self: Stream): Effect => Effect.scoped(self.runFoldWhileScopedEffect(s, constTrue, f)) }