import * as tsplus_module_1 from "@effect/core/io/Effect/operations/succeedNow";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/scanEffect";
/**
 * Statefully maps over the elements of this stream to produce all
 * intermediate results of type `S` given an initial S.
 *
 * @tsplus fluent ets/Stream scan
 */

export function scan_(self, s, f, __tsplusTrace) {
  return tsplus_module_2.scanEffect_(self, s, (s, a) => tsplus_module_1.succeedNow(f(s, a), __tsplusTrace), __tsplusTrace);
}
/**
 * Statefully maps over the elements of this stream to produce all
 * intermediate results of type `S` given an initial S.
 *
 * @tsplus static ets/Stream/Aspects scan
 */

export const scan = (s, f, __tsplusTrace) => self => scan_(self, s, f, __tsplusTrace);
//# sourceMappingURL=scan.mjs.map