maurogestoso
7/13/2017 - 10:13 AM

medium-memoize-7.js

test(‘returns the correct value when called multiple times with the same first argument but a different second argument’, () => {
  const add = (a, b) => a + b;
  const _add = memoize(add);
  expect(_add(2, 3)).toBe(5);
  expect(_add(2, 4)).toBe(6);
});