Shin-Cheng Mu wrote:
| Undoubtedly you can write your own monad and encapsulate
| the random number generation yourself. It is just an
| instance of a state monad.
A state monad has (like you say) the disadvantage that it is
single threaded. A big problem then is laziness; it becomes
impossi
Hello,
Undoubtedly you can write your own monad and encapsulate
the random number generation yourself. It is just an
instance of a state monad.
Nevertheless, the problem of using state monads for random number
generation is that the code must be single-threaded, which is
sometimes too restric
>>> Does anybody know of work using monads to encapsulate a source of
>>> random numbers?
>> Is the global random number generator, in section
>> 17.3 of the Haskell 98 library report, the sort of thing you're after?
> No; that appears to embed a generator in the IO monad. Not what I'd
> hoped f
On 09-Aug-2000, Carl R. Witty <[EMAIL PROTECTED]> wrote:
> 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 w
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 t
> > Does anybody know of work using monads to encapsulate a source of
> > random numbers?
> Is the global random number generator, in section 17.3 of the Haskell
> 98 library report, the sort of thing you're after?
No; that appears to embed a generator in the IO monad.
Not what I'd hope
Norman Ramsey 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'.
>
>
> Norman
Hi.
Is the
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'.
Norman