[Haskell-cafe] Haskell and "memoization"

Daniel Fischer daniel.is.fischer at web.de
Wed Dec 16 10:01:39 EST 2009


Am Mittwoch 16 Dezember 2009 15:49:54 schrieb michael rice:
> Thanks all,
>
> OK, so this definition of fib
>
> fib 0 = 1
> fib 1 = 1
> fib n = fib (n-1) + fib (n-2)
>
> would involve a lot of recomputation for some large n,

Where "large" can start as low as 20; 60 would be out of reach.

> which memoization would eliminate?

Right.
>
> Michael



More information about the Haskell-Cafe mailing list