def memo(f):
    "Return a function like f that remembers and reuses results of past calls."
    table = {}
    def memo_f(*args):
        try:
            return table[args]
        except __HOLE__:
            table[args] = value = f(*args)
            return value
    return memo_f


# Strategies. They all presume the game's not over.
dataset/ETHPy150Open thomasballinger/curtsies/examples/tttplaybitboard.py/memo