import * as O from "../../Option"
import { collect_ } from "./collect"
import { repeatEither_ } from "./repeatEither"
/**
 * Repeats the entire stream using the specified schedule. The stream will execute normally,
 * and then repeat again according to the provided schedule.
 */

export function repeat_(self, schedule) {
  return collect_(repeatEither_(self, schedule), O.fromEither)
}
/**
 * Repeats the entire stream using the specified schedule. The stream will execute normally,
 * and then repeat again according to the provided schedule.
 */

export function repeat(schedule) {
  return (self) => repeat_(self, schedule)
}
//# sourceMappingURL=repeat.js.map
