pub fn extract_enode(enode: &Lambda, egraph: &EGraph) -> Expr {
    match enode {
        Lambda::Prim(p) => Expr::prim(*p),
        Lambda::Var(i) => Expr::var(*i),
        Lambda::IVar(i) => Expr::ivar(*i),
        Lambda::App([f,x]) => Expr::app(extract(*f,egraph),extract(*x,egraph)),
        Lambda::Lam([b]) => Expr::lam(extract(*b,egraph)),
        _ => {panic!("not rendered")},
    }
}
/// like extract() but works on nodes
like extract() but works on nodes
like extract () but works on nodes
pub fn extract_enode(enode: &Lambda, egraph: &EGraph) -> Expr {
    match enode {
        Lambda::Prim(p) => Expr::prim(*p),
        Lambda::Var(i) => Expr::var(*i),
        Lambda::IVar(i) => Expr::ivar(*i),
        Lambda::App([f,x]) => Expr::app(extract(*f,egraph),extract(*x,egraph)),
        Lambda::Lam([b]) => Expr::lam(extract(*b,egraph)),
        _ => {panic!("not rendered")},
    }
}
pub fn extract_enode ( enode : & Lambda , egraph : & EGraph ) -> Expr { match enode { Lambda :: Prim ( p ) => Expr :: prim ( * p ) , Lambda :: Var ( i ) => Expr :: var ( * i ) , Lambda :: IVar ( i ) => Expr :: ivar ( * i ) , Lambda :: App ( [ f , x ] ) => Expr :: app ( extract ( * f , egraph ) , extract ( * x , egraph ) ) , Lambda :: Lam ( [ b ] ) => Expr :: lam ( extract ( * b , egraph ) ) , _ => { panic ! ( " " ) } , } }
like extract() but works on nodes
like extract () but works on nodes
enode
&Lambda
egraph
&EGraph
enode
&Lambda
egraph
&EGraph