Closed WeeBull closed 5 years ago
Unfortunately there's no way to generate infinite list since generator work in ST/IO it uses mutable state underneath.
Generating finite list/vector on other hand is easy: replicateM n (uniformR range gen)
Thanks, closing issue
I'm porting some code from using
System.Random
to this library. The code is usingrandoms
andrandomRs
functions which produces an infinite list of random values. Is there an advised way to do the same thing here?If not, then an alternative would be a vector, but I'd need a vector of ranged values (i.e.
uniformR
), but we don't seem to have that available.