import * as tsplus_module_1 from "@effect/core/stream/Sink/operations/fold";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/runScoped";
/**
 * Executes a pure fold over the stream of values. Returns a scoped value
 * that represents the scope of the stream. Stops the fold early when the
 * condition is not fulfilled.
 *
 * @param cont A function which defines the early termination condition.
 *
 * @tsplus fluent ets/Stream runFoldWhileScoped
 */

export function runFoldWhileScoped_(self, s, cont, f, __tsplusTrace) {
  return tsplus_module_2.runScoped_(self, () => tsplus_module_1.fold(s, cont, f, __tsplusTrace), __tsplusTrace);
}
/**
 * Executes a pure fold over the stream of values. Returns a scoped value
 * that represents the scope of the stream. Stops the fold early when the
 * condition is not fulfilled.
 *
 * @param cont A function which defines the early termination condition.
 *
 * @tsplus static ets/Stream/Aspects runFoldWhileScoped
 */

export const runFoldWhileScoped = (s, cont, f, __tsplusTrace) => self => runFoldWhileScoped_(self, s, cont, f, __tsplusTrace);
//# sourceMappingURL=runFoldWhileScoped.mjs.map