MCPcopy Create free account
hub / github.com/Effect-TS/effect / step

Function step

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

Source from the content-addressed store, hash-verified

1277export const repeatForever = <Env, In, Out>(self: Schedule.Schedule<Out, In, Env>): Schedule.Schedule<Out, In, Env> =>
1278 makeWithState(self.initial, (now, input, state) => {
1279 const step = (
1280 now: number,
1281 input: In,
1282 state: any
1283 ): Effect.Effect<[any, Out, ScheduleDecision.ScheduleDecision], never, Env> =>
1284 core.flatMap(
1285 self.step(now, input, state),
1286 ([state, out, decision]) =>
1287 ScheduleDecision.isDone(decision)
1288 ? step(now, input, self.initial)
1289 : core.succeed([state, out, decision])
1290 )
1291 return step(now, input, state)
1292 })
1293

Callers 1

repeatForeverFunction · 0.70

Calls 1

stepMethod · 0.65

Tested by

no test coverage detected