Embed memoization inside delay/promise