def _Apply(self, ast):
        #This catches the case where a procedure that is being
        #converted to a closure is recursive. In this case,
        #we don't make a new closure, we simply call the one
        #we've already got
        if not isinstance(ast.function(), S.Name):
            import pdb
            pdb.set_trace()
        proc_name = ast.function().id
        if self.env in proc_name and isinstance(self.env[proc_name], list):
            return S.Apply(ast.function(),
                           ast.arguments() + self.env[proc_name])
        return self.rewrite_children(ast)
    
    # XXX This rewrite rule -- coupled with the rule for _Procedure in
    #     _ClosureConverter -- is an ugly hack for rewriting calls to
    #     procedures.  We should find a more elegant solution!
dataset/ETHPy150Open bryancatanzaro/copperhead/copperhead/compiler/rewrites.py/_ClosureRecursion._Apply/swapped operands of `in`