(*rules, **kwargs)
return exhaust(top_down(exhaust(do_one(*rules)), **kwargs))
Strategy for canonicalization

    Apply each rule in a bottom_up fashion through the tree.
    Do each one in turn.
    Keep doing this until there is no change.
Strategy for canonicalization
Strategy for canonicalization
def canon(*rules, **kwargs):
    """ Strategy for canonicalization

    Apply each rule in a bottom_up fashion through the tree.
    Do each one in turn.
    Keep doing this until there is no change.
    """
    return exhaust(top_down(exhaust(do_one(*rules)), **kwargs))
def canon ( * rules , * * kwargs ) : return exhaust ( top_down ( exhaust ( do_one ( * rules ) ) , * * kwargs ) )