Hi Lyndon,

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.

http://en.wikibooks.org/wiki/Haskell/Understanding_monads/State

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,

Michael


--- On Mon, 7/26/10, Lyndon Maydwell <[email protected]> wrote:

From: Lyndon Maydwell <[email protected]>
Subject: Re: [Haskell-cafe] Random this! ;-)
To: "michael rice" <[email protected]>
Cc: "Max Rabkin" <[email protected]>, "Ozgur Akgun" <[email protected]>, 
[email protected]
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.



      
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to