minor simplification in memoize implementation for lambda<T>