import { constVoid, pipe } from "../../Function"
import * as SC from "../../Schedule"
import * as T from "../_internal/effect"
import { repeatEffectOption } from "./repeatEffectOption"
import { unwrap } from "./unwrap"
/**
 * Creates a stream from a `Schedule` that does not require any further
 * input. The stream will emit an element for each value output from the
 * schedule, continuing for as long as the schedule continues.
 */

export const fromSchedule = (x) =>
  unwrap(T.map_(SC.driver(x), (driver) => repeatEffectOption(driver.next(constVoid()))))
//# sourceMappingURL=fromSchedule.js.map
