
27 Nov
2007
27 Nov
'07
11:17 a.m.
On Tue, 27 Nov 2007 manolo@austrohungaro.com wrote:
Hello,
I'm trying to program an implementation of the St. Petersburg game in Haskell. There is a coin toss implied, and the random-number generation is driving me quite mad. So far, I've tried this:
import Random
increment :: Int -> Int increment b = b + 1
main = do let b = 0 let c = randomRIO (1,2) until (c == 1) increment b return b
http://www.haskell.org/pipermail/haskell-cafe/2006-December/020005.html