[Haskell-cafe] monte carlo trouble
Paul Johnson
paul at cogito.org.uk
Fri Aug 17 19:56:00 EDT 2007
I finally decided to actually solve the problem, and I'm sorry to say I
was on the wrong track. ListT won't do it on its own: you actually need
a custom monad that does the random pick in the bind operation.
Attached are a module to solve the problem and a Main module that tests
it. I hope this helps.
Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.hs
Type: text/x-haskell
Size: 659 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070818/d003aed9/Main-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MonteCarlo.hs
Type: text/x-haskell
Size: 1653 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070818/d003aed9/MonteCarlo-0001.bin
More information about the Haskell-Cafe
mailing list