
23 Oct
2008
23 Oct
'08
1:54 p.m.
Hello Thomas, Thursday, October 23, 2008, 8:41:04 PM, you wrote:
The problem is not fitting a 10^8 element list in memory, the following works fine (when compiled, though not in ghci): t = putStrLn . show . last $ [1..10^8::Int]
this runs in 1k space, thanks to lazy evaluation. 10^8-length list needs ~3gb of memory, it was discussed just a few days ago -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com