You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
357 B

from .core import exhaust, multiplex
from .traverse import top_down
def canon(*rules):
""" Strategy for canonicalization
Apply each branching rule in a top-down fashion through the tree.
Multiplex through all branching rule traversals
Keep doing this until there is no change.
"""
return exhaust(multiplex(*map(top_down, rules)))