MemoTrie is functional library for creating efficient memo functions, using tries. It's based on some code from Spencer Janssen (originally put on hpaste.org, now expired), which I assume was based on Ralf Hinze's paper Memo functions, polytypically!.
Install with cabal install Memotrie
.
See also
- Library documentation on Hackage.
- Related blog posts.