[Haskell-cafe] Just how unsafe is unsafe

Max Rabkin max.rabkin at gmail.com
Thu Feb 5 17:22:45 EST 2009


2009/2/5 Peter Verswyvelen <bugfact at gmail.com>:
> Of course you could just put this random generator in the IO monad, but
> certain algorithms- like Monte Carlo - intuitively don't seem to operate in
> a IO monad to me.

For PRNGs, only State is needed, not IO.

But you might find the `randoms' function useful: it returns in
infinite list of pseudo-random values.

--Max


More information about the Haskell-Cafe mailing list