On Fri, 8 Jul 2005, Dinh Tien Tuan Anh wrote:

>   Another question, it's said in the book that using cyclic structure (like
> ones = 1:ones) , the list would be represented by a fixed amount of memory.
>
>   Does it mean [1,1,1......] only occupy one cell of memory ?
>   How about  in " take 100 [1,1,...] " ?

'take' will certainly ignore the cyclic structure. Even if it could detect
the cycle in its argument there is no way to represent the list of 100
elements more efficiently.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to