Spaces:
Sleeping
Sleeping
File size: 357 Bytes
6a86ad5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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)))
|