import { StreamInternal } from "@effect/core/stream/Stream/operations/_internal/StreamInternal" /** * Repeats the entire stream using the specified schedule. The stream will * execute normally, and then repeat again according to the provided schedule. * * @tsplus static effect/core/stream/Stream.Aspects repeat * @tsplus pipeable effect/core/stream/Stream repeat */ export function repeatNow(schedule: Schedule) { return (self: Stream): Stream => self.repeatEither(schedule).collectRight } /** * Repeats the provided value infinitely. * * @tsplus static effect/core/stream/Stream.Ops repeat */ export function repeat(a: A): Stream { return new StreamInternal(Channel.write(Chunk.single(a)).repeated) }