[Haskell-cafe] Re: A bit of a shock - Memoizing functions

Martijn van Steenbergen martijn at van.steenbergen.nl
Fri Mar 27 19:15:22 EDT 2009

Kirk Martinez wrote:
> It seems there is a very close correspondence between data structures 
> and functions in Haskell.  Your powersOfTwo function, since it gets 
> memoized automatically (is this the case for all functions of zero 
> arguments?), seems exactly like a data structure.  This harks back to my 
> Scheme days when we learned about the close relationship between code 
> and data.

You might also find Neil's blog post about CAFs interesting:


Fijne avond,


More information about the Haskell-Cafe mailing list