Lodash's memoize function, but in a much smaller package than lodash.memoize's.
A variant of lodash's memoize function that remembers only one result, the last one.