/** * Schedules the output of the stream using the provided `schedule`. * * @tsplus static effect/core/stream/Stream.Aspects schedule * @tsplus pipeable effect/core/stream/Stream schedule */ export function schedule(schedule: Schedule) { return (self: Stream): Stream => self .scheduleEither(schedule) .collect((either) => (either.isRight() ? Maybe.some(either.right) : Maybe.none)) }