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

Function schedule

packages/effect/test/Schedule.test.ts:70–72  ·  view source on GitHub ↗
(ref: Ref.Ref<number>)

Source from the content-addressed store, hash-verified

68 it.effect("perform log for each recurrence of effect", () =>
69 Effect.gen(function*() {
70 const schedule = (ref: Ref.Ref<number>) => {
71 return Schedule.recurs(3).pipe(Schedule.onDecision(() => Ref.update(ref, (n) => n + 1)))
72 }
73 const ref = yield* Ref.make(0)
74 yield* pipe(Ref.getAndUpdate(ref, (n) => n + 1), Effect.repeat(schedule(ref)))
75 const result = yield* Ref.get(ref)

Callers 2

dryRunFunction · 0.85
Schedule.test.tsFile · 0.85

Calls 2

pipeMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected