Sampling sequences of random numbers in Haskell
I think that doing your computations that require random numbers inside a monad that abstracts away the generator is the cleanest thing. Here is what that code would look like: We are going to put the StdGen instance in a state monad, then provide some sugar over the state monad’s get and set method to … Read more