uniformR package:MonadRandom
Produce an infinite list of pseudo-random values in a specified range.
Same as
uniforms, integrates nicely with list fusion. There is
no way to recover the final generator, therefore either use
split before calling
uniformRs or use
uniformListR instead.
Similar to
randomRs, except it relies on
UniformRange
type class instead of
Random.
Examples
>>> let gen = mkStdGen 2023
>>> take 5 $ uniformRs (10, 100) gen :: [Int]
[32,86,21,57,39]
The class of types for which a uniformly distributed value can be
drawn from a range.