Hello,

 

Sorry for asking such a silly question: Haskell is using lazy evaluation. So, it means we should be able to declare and use a list of billions elements without any trouble. So I declare my list as follow:

 

mylist :: [Integer]

mylist = [1..1000000000]

 

In Hugs, I type mylist to print out all the elements inside. However, after printing about 22000 elements, the system crashs & outputs: “Garbage collection fails to reclaim sufficient memory”

 

Would you please help me with this problem?

Thank you very much,

Phan Dung.