Hi,
you find such a memoize here:
http://kotka.de/blog/2010/03/memoize_done_right.html.
It's based on an old discussion thread of memoize here on the group.
Then there is cache-dot-clj, which is based on the above:
https://github.com/alienscience/cache-dot-clj.
Hope that helps.
Sincerely
Meikel
I noticed recently that clojure.core/memoize does not promise that
memoized calls will occur only once in the presence of multiple
threads. i.e:
user=> (dorun (map (memoize (fn [x] (Thread/sleep 1000) (print x)))
(repeat 10 1)))
1nil
However:
user=> (dorun (pmap (memoize (fn [x] (Thread/sleep 10