> You want the first N digits of pi? Just wait while I calculate all of them for you...
I don't think that example cold actually happen, or at least I can't see how it would happen in Haskell.
I don't think that example cold actually happen, or at least I can't see how it would happen in Haskell.
In Haskell when the compiler misses an optimization the performance hit is potentially unbounded, as it could think anything is a dependency. (You want the first N digits of pi? Just wait while I calculate all of them for you...)