|
I want to analyze my Haskell code. Is there an approach, as e.g. amortized analysis, to analyzing lazily evaluated algorithms? |
|
There are some details in Chris Okasaki, "Purely Functional Data Structures". The major thing to note is that when you have a lazy structure in e.g. Haskell, then call-by-need makes you evaluate a certain path once and only once. Provided that you structure your program correctly that is. But in general this is quite hard. It was one of the negative points on lazy evaluation in the beginning. |