
15 Jun
2008
15 Jun
'08
8:03 a.m.
Great reply! One minor point: If real_programme is to be pure, you should use let: On Jun 14, 2008, at 12:30, Jon Fairbairn wrote:
main :: IO() do gen <- getStdGen the_list <- real_programme gen let the_list = real_programme gen print the_list
You should be able to deduce from the fact that the first argument of real_programme here is of type StdGen (not IO anything) and its result type is [something] that real_programme is pure, and gen has only one value throughout.
Cheers Robert