/** * Statefully maps over the elements of this stream to produce all * intermediate results. * * @tsplus static effect/core/stream/Stream.Aspects scanReduce * @tsplus pipeable effect/core/stream/Stream scanReduce */ export function scanReduce( f: (a2: A2, a: A) => A2 ) { return (self: Stream): Stream => self.scanReduceEffect((curr, next) => Effect.sync(f(curr, next))) }