var mult = function(){
var a = 1;
for(var i=0,l = arguments.length;i<l;i++){
a = a*arguments[i]
}
return a;
}
var proxyMult = (function(){
var cache = [];
return function(){
var args = Array.prototype.join.call(arguments,',');
if(args in cache){
// console.error(cache)
return cache[ args ]
}
// console.error(cache)
return cache[ args ] = mult.apply(this,arguments)
}
})();
console.log(proxyMult(1,2,3,4))
console.log(proxyMult(1,2,3,4))
console.log(proxyMult(3,2,1,5))
console.log(proxyMult(3,2,1,5))
console.log(mult(2,3,4))
console.log(mult(5,9,14))
console