
3 Jan
2010
3 Jan
'10
1:24 p.m.
Hello Larry, Sunday, January 3, 2010, 8:46:30 PM, you wrote:
Using "seed<-getSeed" from the ghci command line works. Why doesn't it work in a script?
because it's a feature of ghci command prompt, not haskell language. use smth like this: randList minval maxval = do seed <- getSeed return$ randomRs (minval,maxval) (mkStdGen seed) of course, it will make randList non-pure function that may return different results on different calls but that that you mean, no? ;) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com