[Haskell-cafe] Re: Haskell and "memoization"
uzytkownik2 at gmail.com
Wed Dec 16 02:14:40 EST 2009
On Tue, 2009-12-15 at 19:32 -0800, michael rice wrote:
> I'm looking here at the Fibonacci stuff:
> Since (I've read) Haskell never computes the value
> of a function more than once, I don't understand the
> need for memoization.
> Enlighten me.
Sorry I'm asking - is there any reason why fib memorization goes beyond:
fib' = 1 : 1 : zipWith (+) fib' (tail fib')
fib n = fib' !! n
More information about the Haskell-Cafe