src/Ify.js
function memoify(fn, {hash, cache} = {}) {
  hash = hash || identify;
  cache = cache = {};
  function memoified(...args) {
    var key = hash(...args);
    return key in cache ? cache[key] : cache[key] = fn.call(this, ...args);
  }
  memoified.clear = () => cache = {};
  return memoified;
}
function memoify(fn, {hash, cache} = {}) {
  hash = hash || identify;
  cache = cache = {};
  function memoified(...args) {
    var key = hash(...args);
    return key in cache ? cache[key] : cache[key] = fn.call(this, ...args);
  }
  memoified.clear = () => cache = {};
  return memoified;
}
function memoify ( fn , { hash , cache } = { } ) { hash = hash || identify ; cache = cache = { } ; function memoified ( ... args ) { var key = hash ( ... args ) ; return key in cache ? cache [ key ] : cache [ key ] = fn . call ( this , ... args ) ; } memoified . clear = ( ) => cache = { } ; return memoified ; }
Make a function which memozies its result.
Make a function which memozies its result .