Because that would imply you store all calls(parameters and results) during the program execution. And that would require potentialy infinite memory.

You might argue that only some need to be memoized. And this is precisely the case. But this reasoning(which to memoize) cannot be fully automated(yet).

On Wednesday, March 26, 2014 8:42:32 AM UTC+1, Cosmia Luna wrote:
Hi everyone, I'm new to Haskell.

I'm confused about the pure function and lazy evaluation in Haskell. Why there is not built-in support for memoization, with the fact that calls with same parameters returns the same result?


----
Cosmia