free_vars

Function free_vars 

Source
pub fn free_vars(
    c: &Core,
    bound: &mut BTreeSet<VarId>,
    out: &mut BTreeSet<VarId>,
)
Expand description

Every variable an expression reads and does not itself bind.

One implementation, because two passes need the same answer for different reasons: crate::plan asks it of a signal function to decide what a dataflow operator has to be handed, and a native backend asks it of a lam to decide what a closure has to carry — a second walk that disagreed about one construct would give a compiled closure a field the evaluator’s environment does not have.