Initial implementation of memoizer