
19 Sep
2009
19 Sep
'09
10:37 a.m.
Hi haskell-cafe, Why does rlist 100000 [] gives stack overflow in ghci? rlist 0 l = return l rlist n l = do {x <- randomRIO (1,maxBound::Int); let nl = x:l in nl `seq` rlist (n-1) nl} I first uses replicateM then foldM and finally an explicit function. But they give all stack overflow I don't know why 100000 is not absurd and it is tail recursive. Or is it not, due to the monad structure? greetings Gerben -- View this message in context: http://www.nabble.com/Why-the-stack-overflow--tp25520431p25520431.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.