Passing Input Through with `Effect.repeat` and `Schedule.recurs`

How to let the input pass through when using
Effect.repeat
with Schedule.recurs?

const policy = pipe(
  Schedule.recurs(2),
  Schedule.addDelay(() => 1000),
);
 
const program = pipe(
  Random.nextIntBetween(0, 100),
  E.repeat(policy),
  E.tap(E.log),   //currently showing the number of attemps, instead of the random number
);


https://effect.website/play#6da0fce2ace9
Was this page helpful?