Memoization is a well known and well studied optimization technique. In Haskell, the purely functional semantics allows function applications to reuse previous invocations, by looking up a cache or memo table. Take the classical fib function. fib :: Int -> Int fib n = if n < 2 then 1 else fib (n-1) + fib (n-2) There are many calls to fib with the same argument. But is there a way of memoizing thi