Hi, I expressed Memoization and Memoization Tail Recursive on the functions. I hope something useful.
22 people like thisPosted: 14 years ago by zecl
Sometimes you might wish to memoize a function whose input doesn't have the equality and comparison constraints, or maybe the comparison of your given type is just too slow for what you need. To fix this, you simply provide a function which converts the input into something more fitting as an extra parameter.
7 people like thisPosted: 13 years ago by Rick Minerich
This is more generic variant of http://www.fssnip.net/c4 if you want to memoize over different functions / code paths that calls the same to-be-cached-code.
7 people like thisPosted: 8 years ago by Tuomas Hietanen
A Clojure inspired (race free) memoize function, that uses a mutable atom cell.
21 people like thisPosted: 13 years ago by Nick Palladinos
Memoize a function in a thread-safe manner. Added a wrapper around the value a. The idea being, that a unit value is represented as a null value at run time and as such the concurrent dictionary throws.
11 people like thisPosted: 12 years ago by Matt Collins
This is variant of http://www.fssnip.net/sA that is having a time-out. You may want to use this if you e.g. cache a database query result or other mutable data source.
3 people like thisPosted: 8 years ago by Tuomas Hietanen