MCPcopy
hub / github.com/Effect-TS/effect / step

Function step

packages/effect/src/internal/schedule.ts:1271–1282  ·  view source on GitHub ↗
(
      now: number,
      input: In,
      state: any
    )

Source from the content-addressed store, hash-verified

1269export const repeatForever = <Env, In, Out>(self: Schedule.Schedule<Out, In, Env>): Schedule.Schedule<Out, In, Env> =>
1270 makeWithState(self.initial, (now, input, state) => {
1271 const step = (
1272 now: number,
1273 input: In,
1274 state: any
1275 ): Effect.Effect<[any, Out, ScheduleDecision.ScheduleDecision], never, Env> =>
1276 core.flatMap(
1277 self.step(now, input, state),
1278 ([state, out, decision]) =>
1279 ScheduleDecision.isDone(decision)
1280 ? step(now, input, self.initial)
1281 : core.succeed([state, out, decision])
1282 )
1283 return step(now, input, state)
1284 })
1285

Callers 1

repeatForeverFunction · 0.70

Calls 1

stepMethod · 0.65

Tested by

no test coverage detected