def evaluate_cont(self, solver, cont, exps): exps1 = [(closure(exp, solver.env)) for exp in exps] return self.run(solver, cont, exps1)
def closure(self, env): head = closure(self.head, env) tail = closure(self.tail, env) if head==self.head and tail==self.tail: return self return Cons(head, tail)
def closure(self, env): return CommandCall(self.operator, *[closure(x, env) for x in self.operand])