Simplify memoize return