arrow-fx / arrow.fx / Schedule / jittered
fun jittered(genRand: Kind<F,
Double
>):
Schedule
<F, Input, Output>
Add random jitter to a schedule.
The argument genRand is supposed to be a computation that returns
doubles. An example would be the following IO IO { Random.nextDouble() }
.
This is done to push the source of randomness to the caller which makes the function jittered deterministic and testable.
The result returned by genRand is multiplied with the current duration.
fun jittered(MF:
MonadDefer
<F>):
Schedule
<F, Input, Output>
Do you like Arrow?
✖