def copy_rule_head(self, env): head = copy_rule_head(self.head, env) tail = copy_rule_head(self.tail, env) if head==self.head and tail==self.tail: return self return Cons(head, tail)
def unify_rule_head(self, head, env, subst): subst[self] = copy_rule_head(head, env) yield True