[Haskell-beginners] Caching evaluation of lazy lists

Philip Scott pscott at foo.me.uk
Fri Oct 23 12:30:53 EDT 2009

Hello again,
> then, barring memory pressure forcing it out, it will be computed only once (each list 
> element will be computed only once, when it's first needed).
Thanks Daniel, that was what I was after. Is there any way of 
investigating these things without using the profiler? E.g. is there any 
way to stick a debug print statement inside a function without moving 
over to sideeffects and IO Monads etc.. I know printing is a side 
effect, but it would be nice to say 'I can has itsy sneeky side effect 
plz Haskell, just for little testing while'



More information about the Beginners mailing list