/// Rewrite the FlatTerm by matching the lhs and substituting the rhs.
/// The lhs must be guaranteed to match.
Rewrite the FlatTerm by matching the lhs and substituting the rhs.
The lhs must be guaranteed to match.
Rewrite the FlatTerm by matching the lhs and substituting the rhs . The lhs must be guaranteed to match .
pub fn rewrite(&self, lhs: &PatternAst<L>, rhs: &PatternAst<L>) -> FlatTerm<L> {
        let lhs_nodes = lhs.as_ref().as_ref();
        let rhs_nodes = rhs.as_ref().as_ref();
        let mut bindings = Default::default();
        self.make_bindings(lhs_nodes, lhs_nodes.len() - 1, &mut bindings);
        FlatTerm::from_pattern(rhs_nodes, rhs_nodes.len() - 1, &bindings)
    }
pub fn rewrite ( & self , lhs : & PatternAst < L > , rhs : & PatternAst < L > ) -> FlatTerm < L > { let lhs_nodes = lhs . as_ref ( ) . as_ref ( ) ; let rhs_nodes = rhs . as_ref ( ) . as_ref ( ) ; let mut bindings = Default :: default ( ) ; self . make_bindings ( lhs_nodes , lhs_nodes . len ( ) - 1 , & mut bindings ) ; FlatTerm :: from_pattern ( rhs_nodes , rhs_nodes . len ( ) - 1 , & bindings ) }
Rewrite the FlatTerm by matching the lhs and substituting the rhs.
Rewrite the FlatTerm by matching the lhs and substituting the rhs .
&self
lhs
&PatternAst<L>
rhs
&PatternAst<L>