Say I have a quoted anonymous function, like :(x->y=1; y+x+z). I'd like to determine that 'z' is not bound within the function (ie, is a reference to an enclosing outer/global scope). What's a good way to do it?
I know I could recursively analyze the Expr, keeping track of which variables were assigned to at each scope level introduced within the Expr, but that seems like I'd be duplicating effort that must implicitly be in Julia already and might be brittle with regard to subtle scoping rules.