pub fn recursive_var_mod(
    var_mod: impl Fn(i32, i32, i32, &mut crate::EGraph) -> Option<Id>,
    ivars: bool,
    eclass:Id,
    egraph: &mut crate::EGraph,
    seen: &mut RecVarModCache
    ) -> Option<Id>
    {
        recursive_var_mod_helper(
            &var_mod,
            ivars,
            eclass,
            0,
            egraph,
            seen,
        )
}
/// This is a helper function for implementing various recursive operations that only
/// modify Var or IVar constructs (use `ivars=true` to run this on all ivars). Just provide
/// a function that you want to call on each Var to determine what to replace it with. The function
/// signature should be `(actual_idx, depth, which_upward_ref, egraph) -> Option<Id>`.
/// 
/// We recurse over the full graph rooted at `eclass` and replace any `Var` (or `IVar` if `ivars=true`)
/// with the result of calling the function with:
/// * `actual_idx`: if we're matching on Var(i) this is i
/// * `depth`: how many Lamdas are between this Var and the original toplevel eclass this was called on
/// * `which_upward_ref`: this is just actual_idx-depth
/// * `egraph`: the EGraph we're operating on
/// 
/// Note that we wont touch any branches of the tree that dont have free variables with respect to the toplevel,
/// so this will never be called on some Var(i) if it is not considered a free variable in `eclass` as a whole.
/// 
/// This function is fairly efficient. We cache both within and between calls to it, it uses
/// the enode data that tells us if there are no free variables in a branch (and thus it can be ignored),
/// it operates on the structurally hashed form of the graph, etc.
This is a helper function for implementing various recursive operations that only
modify Var or IVar constructs (use `ivars=true` to run this on all ivars). Just provide
a function that you want to call on each Var to determine what to replace it with. The function
signature should be `(actual_idx, depth, which_upward_ref, egraph) -> Option`.



Note that we wont touch any branches of the tree that dont have free variables with respect to the toplevel,
so this will never be called on some Var(i) if it is not considered a free variable in `eclass` as a whole.

This function is fairly efficient. We cache both within and between calls to it, it uses
the enode data that tells us if there are no free variables in a branch (and thus it can be ignored),
it operates on the structurally hashed form of the graph, etc.
This is a helper function for implementing various recursive operations that only modify Var or IVar constructs ( use ` ivars = true ` to run this on all ivars ) . Just provide a function that you want to call on each Var to determine what to replace it with . The function signature should be ` ( actual_idx depth which_upward_ref egraph ) - > Option ` . Note that we wont touch any branches of the tree that dont have free variables with respect to the toplevel so this will never be called on some Var ( i ) if it is not considered a free variable in ` eclass ` as a whole . This function is fairly efficient . We cache both within and between calls to it it uses the enode data that tells us if there are no free variables in a branch ( and thus it can be ignored ) it operates on the structurally hashed form of the graph etc .
pub fn recursive_var_mod(
    var_mod: impl Fn(i32, i32, i32, &mut crate::EGraph) -> Option<Id>,
    ivars: bool,
    eclass:Id,
    egraph: &mut crate::EGraph,
    seen: &mut RecVarModCache
    ) -> Option<Id>
    {
        recursive_var_mod_helper(
            &var_mod,
            ivars,
            eclass,
            0,
            egraph,
            seen,
        )
}
pub fn recursive_var_mod ( var_mod : impl Fn ( i32 , i32 , i32 , & mut crate :: EGraph ) -> Option < Id > , ivars : bool , eclass : Id , egraph : & mut crate :: EGraph , seen : & mut RecVarModCache ) -> Option < Id > { recursive_var_mod_helper ( & var_mod , ivars , eclass , 0 , egraph , seen , ) }
This is a helper function for implementing various recursive operations that only
modify Var or IVar constructs (use `ivars=true` to run this on all ivars).
This is a helper function for implementing various recursive operations that only modify Var or IVar constructs ( use ` ivars = true ` to run this on all ivars ) .
var_mod
impl Fn(i32, i32, i32, &mut crate::EGraph) -> Option<Id>
ivars
bool
eclass
Id
egraph
&mut crate::EGraph
seen
&mut RecVarModCache
var_mod
impl Fn(i32, i32, i32, &mut crate::EGraph) -> Option<Id>
ivars
bool
eclass
Id
egraph
&mut crate::EGraph
seen
&mut RecVarModCache