A Better Javascript Memoizer

We have covered memoizers in the past, but John Hann has posted on a nice implementation that takes advantage of closures, arity, and recursion — 3 concepts/features that Javascript was meant to use.
It leads to this generic version:
PLAIN TEXT
JAVASCRIPT:

 

// memoize: a general-purpose function to enable a function to use memoization

//   func: the function to be [...]

Continue reading over at Ajaxian...

Leave a Reply