pub fn deep_deref(&self, term: &Term) -> Term {
        pub struct Derefer<'a> {
            binding_manager: &'a BindingManager,
        }

        impl<'a> Derefer<'a> {
            pub fn new(binding_manager: &'a BindingManager) -> Self {
                Self { binding_manager }
            }
        }

        impl<'a> Folder for Derefer<'a> {
            fn fold_term(&mut self, t: Term) -> Term {
                match t.value() {
                    Value::Expression(_) => t,
                    Value::List(_) => fold_term(self.binding_manager.deref(&t), self),
                    Value::Variable(_) | Value::RestVariable(_) => {
                        let derefed = self.binding_manager.deref(&t);
                        fold_term(derefed, self)
                    }
                    _ => fold_term(t, self),
                }
            }
        }

        Derefer::new(self).fold_term(term.clone())
    }
/// Dereference all variables in term, including within nested structures like
/// lists and dictionaries.
Dereference all variables in term, including within nested structures like
lists and dictionaries.
Dereference all variables in term including within nested structures like lists and dictionaries .
pub fn deep_deref(&self, term: &Term) -> Term {
        pub struct Derefer<'a> {
            binding_manager: &'a BindingManager,
        }
        impl<'a> Derefer<'a> {
            pub fn new(binding_manager: &'a BindingManager) -> Self {
                Self { binding_manager }
            }
        }
        impl<'a> Folder for Derefer<'a> {
            fn fold_term(&mut self, t: Term) -> Term {
                match t.value() {
                    Value::Expression(_) => t,
                    Value::List(_) => fold_term(self.binding_manager.deref(&t), self),
                    Value::Variable(_) | Value::RestVariable(_) => {
                        let derefed = self.binding_manager.deref(&t);
                        fold_term(derefed, self)
                    }
                    _ => fold_term(t, self),
                }
            }
        }
        Derefer::new(self).fold_term(term.clone())
    }
pub fn deep_deref ( & self , term : & Term ) -> Term { pub struct Derefer < ' a > { binding_manager : & ' a BindingManager , } impl < ' a > Derefer < ' a > { pub fn new ( binding_manager : & ' a BindingManager ) -> Self { Self { binding_manager } } } impl < ' a > Folder for Derefer < ' a > { fn fold_term ( & mut self , t : Term ) -> Term { match t . value ( ) { Value :: Expression ( _ ) => t , Value :: List ( _ ) => fold_term ( self . binding_manager . deref ( & t ) , self ) , Value :: Variable ( _ ) | Value :: RestVariable ( _ ) => { let derefed = self . binding_manager . deref ( & t ) ; fold_term ( derefed , self ) } _ => fold_term ( t , self ) , } } } Derefer :: new ( self ) . fold_term ( term . clone ( ) ) }
Dereference all variables in term, including within nested structures like
lists and dictionaries.
Dereference all variables in term including within nested structures like lists and dictionaries .
&self
term
&Term