[Haskell-cafe] Random this! ;-)
nowgate at yahoo.com
Mon Jul 26 09:59:22 EDT 2010
Since the example immediately above the exercise used randomRIO, I assumed that randomRIO was to be used as part of the solution to the exercise.
Also, it was the above mentioned example that introduced me to *liftM2*, about which I posted a question a couple of days ago (subject line: Heavy lift-ing).
The next topic on the wiki page is "Getting Rid of the IO" which seems to be the direction of your post. No doubt I'll have more questions as I plod on.
Thanks for your input,
--- On Mon, 7/26/10, Lyndon Maydwell <maydwell at gmail.com> wrote:
From: Lyndon Maydwell <maydwell at gmail.com>
Subject: Re: [Haskell-cafe] Random this! ;-)
To: "michael rice" <nowgate at yahoo.com>
Cc: "Max Rabkin" <max.rabkin at gmail.com>, "Ozgur Akgun" <ozgurakgun at gmail.com>, haskell-cafe at haskell.org
Date: Monday, July 26, 2010, 8:29 AM
I find it useful to have a seed argument to nearly all random
functions rather than using ones with an IO signature. This way you
can speed up your program quite a bit and also make testing much
easier. I think that MonadRandom does this automatically too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe