On Sat, 2007-10-13 at 12:42 -0400, Brandon S. Allbery KF8NH wrote:
> Your apparently simple StdGen argument is actually a sort of program
> state (represented by unevaluated thunks, not by a state monad; see
> below) which gets altered with every invocation of random. If
> nothing is forced until the very end, it in effect becomes an
> expression which produces the desired StdGen, with the uses of the
> previous StdGen values as "side effects" of its computation that
> occur when the thunk is evaluated at the end. I'm not sure I'm up to
> working through an example of what this looks like.
Thanks Brandon. I understand your argument but I don't know how to put
it into practice, i.e. how to force the evaluation of StdGen.
Haskell-Cafe mailing list