This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A more functional memoizer | |
//We can beef up our module by adding functions later | |
var Memoizer = (function(){ | |
//Private data | |
var cache = {}; | |
//named functions are awesome! | |
function cacher(func){ | |
return function(){ | |
var key = JSON.stringify(arguments); |