Norman Ramsey <[EMAIL PROTECTED]> writes:
> Does anybody know of work using monads to encapsulate a source of
> random numbers? A quick web search suggested Haskell 98 did not take
> this path. I'd be curious for any insights why, or any suggestions
> about a `randomness monad'.
My guess as to why Haskell 98 does not provide a stand-alone
"randomness monad" is that monads are annoying (impossible in general)
to combine. If you want your own randomness monad, it's pretty easy
to put a random state in a state monad; that approach means that you
can easily add other chunks of state as wanted.
Carl Witty