'Store an object in the memo.'

def memoize(self, obj):

    if self.fast:
        return
    assert (id(obj) not in self.memo)
    memo_len = len(self.memo)
    self.write(self.put(memo_len))
    self.memo[id(obj)] = (memo_len, obj)
