import { makeWithState } from "@effect/core/io/Schedule/operations/_internal/makeWithState" /** * Returns a new schedule that effectfully processes every output from this * schedule. * * @tsplus static effect/core/io/Schedule.Aspects tapOutput * @tsplus pipeable effect/core/io/Schedule tapOutput */ export function tapOutput(f: (out: Out) => Effect) { return ( self: Schedule ): Schedule => makeWithState( self.initial, (now, input, state) => self.step(now, input, state).tap(([, out]) => f(out)) ) }