[Haskell-cafe] Memoization

Felipe Almeida Lessa felipe.lessa at gmail.com
Sat May 26 22:41:28 EDT 2007


On 5/26/07, Mark Engelberg <mark.engelberg at gmail.com> wrote:
> I don't see any elegant way to do this in Haskell, and I'm doubting
> its possible.  Can someone prove me wrong?

Provided some sort of memoize :: (a->b) -> (a->b), I'd do something like

f = memoize g where
  g = .... recursive call to f, not g ...

But probably there's something better I've missed =).

-- 
Felipe.


More information about the Haskell-Cafe mailing list