shallowArrayEquals = (a) => (b) => {
  return Array.isArray(a) && Array.isArray(b)
    && a.length === b.length
    && a.every((val, index) => val === b[index])
}
This function is extension on top of lodash.memoize.
It uses all the arguments of the `fn` as the cache key instead of just the first one.
If resolver is provided, it determines the cache key for
storing the result based on the arguments provided to the memoized function.