Automatic memoizing in functional programming languages
问题 I always thought that Haskell would do some sort of automatic intelligent memoizing. E.g., the naive Fibonacci implementation fib 0 = 0 fib 1 = 1 fib n = fib (n-2) + fib (n-1) would be fast because of that. Now I read this and it seems I was wrong -- Haskell doesn't seem to do automatic memoization. Or do I understand something wrong? Are there other languages which do automatic (i.e. implicit, not explicit) memoization? What are common ways to implement memoization? In all sample