import { makeWithState } from "@effect/core/io/Schedule/operations/_internal/makeWithState" /** * Returns a new schedule that deals with a narrower class of inputs than this * schedule. * * @tsplus static effect/core/io/Schedule.Aspects contramapEffect * @tsplus pipeable effect/core/io/Schedule contramapEffect */ export function contramapEffect( f: (in2: In2) => Effect ) { return ( self: Schedule ): Schedule => makeWithState( self.initial, (now, input2, state) => f(input2).flatMap((input) => self.step(now, input, state)) ) }