Write a memoize function such that immediately-repeated calls with the same argument return the same result without invoking the underlying function.
NOTE: The input function can be assumed to only ever take a single parameter.
IMPORTANT: Only IMMEDIATELY repeated calls with the same arguments should be cached.