// ets_tracing: off import type * as CL from "../../../../Clock/index.js" import * as E from "../../../../Either/index.js" import type * as SC from "../../../../Schedule/index.js" import type * as C from "../core.js" import * as ScheduleWith from "./scheduleWith.js" /** * Schedules the output of the stream using the provided `schedule` and emits its output at * the end (if `schedule` is finite). */ export function scheduleEither_( self: C.Stream, schedule: SC.Schedule ): C.Stream> { return ScheduleWith.scheduleWith_( self, schedule, (r) => E.right(r), (l) => E.left(l) ) } /** * Schedules the output of the stream using the provided `schedule` and emits its output at * the end (if `schedule` is finite). * * @ets_data_first scheduleEither_ */ export function scheduleEither(schedule: SC.Schedule) { return (self: C.Stream) => scheduleEither_(self, schedule) }