haskell / random

Random number library
Other
53 stars 50 forks source link

Improve documentation of the global StdGen. #119

Closed lehins closed 2 years ago

lehins commented 3 years ago

Global mutable state is a discouraged practice in Haskell. However, it is still useful in testing, benchmarks and small apps.

Changes in this PR try to capture this and suggest the new approach with some examples as doctests.