Hacker News new | past | comments | ask | show | jobs | submit login

The Random Monad in Haskell allows you to write pseudo-random code without caring where the prng comes from. It's only when the caller runs evalRand/runRand that it must provide the prng. So you can't possibly screw up the random code by sourcing a global prng even if you wanted to; rather, it's the caller that has full control over the prng.

https://hackage.haskell.org/package/MonadRandom-0.1.3/docs/C...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: