Awesome Reviewers

When implementing in-memory caching (e.g., memoization), use a Map for the cache and keep the cache implementation private.

Example (safe memoize):

const memoize = fn => {
  const cache = new Map(); // private
  return value => {
    if (cache.has(value)) return cache.get(value);
    const result = fn(value);
    cache.set(value, result);
    return result;
  };
};