Exemplo n.º 1
0
 def match(self,search):
     for expr in core.commutative_permutations(search):
         res = core.match(self,expr)
         if res:
             return ReplacementMap(core.match(self,expr),self.S)
     return None
Exemplo n.º 2
0
 def commutative_permutations(expr):
     for expr in core.commutative_permutations(expr):
         yield S(expr)