m2m模型翻译
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.

11 lines
356 B

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