Re: [Haskell-cafe] help understanding lazy evaluation

2007-08-23 Thread Xavier Noria
You people rock. Responses were really helpful and I understand how the computation goes now. I see I need to reprogram my eyes to expect lazy evaluation in places where I am used to one-shot results. I see lazy evaluation is all around in Haskell builtins. From a formal point of view

[Haskell-cafe] help understanding lazy evaluation

2007-08-22 Thread Xavier Noria
I am learning Haskell with Programming in Haskell (an excellent book BTW). I have background in several languages but none of them has lazy evaluation. By now I am getting along with the intuitive idea that things are not evaluated until needed, but there's an example I don't understand