import * as tsplus_module_1 from "@effect/core/stream/Stream/operations/repeatElementsEither";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/collectRight";
/**
 * Repeats each element of the stream using the provided schedule. Repetitions
 * are done in addition to the first execution, which means using
 * `Schedule.recurs(1)` actually results in the original effect, plus an
 * additional recurrence, for a total of two repetitions of each value in the
 * stream.
 *
 * @tsplus fluent ets/Stream repeatElements
 */

export function repeatElements_(self, schedule, __tsplusTrace) {
  return tsplus_module_2.collectRight(tsplus_module_1.repeatElementsEither_(self, schedule, __tsplusTrace), __tsplusTrace);
}
/**
 * Repeats each element of the stream using the provided schedule. Repetitions
 * are done in addition to the first execution, which means using
 * `Schedule.recurs(1)` actually results in the original effect, plus an
 * additional recurrence, for a total of two repetitions of each value in the
 * stream.
 *
 * @tsplus static ets/Stream/Aspects repeatElements
 */

export const repeatElements = (schedule, __tsplusTrace) => self => repeatElements_(self, schedule, __tsplusTrace);
//# sourceMappingURL=repeatElements.mjs.map