pub fn export_term(&self, xi: Int) -> Term {
    let x = self.deref(xi);
    let t = tag_of(x);
    let w = detag(x);
   
    match t {

      C => { RecObj::S(self.get_sym(w)) }
      N => { RecObj::I(w) }
      V => { RecObj::S(format!("V{}", w)) }
      R => {
        let a_ = self.heap[w as usize];
        if A != tag_of(a_) {
          panic!("*** should be A, found={}", self.show_cell(a_))
        }
        let n_ = detag(a_);
        //let mut args = Vec::<Box::<RecObj>>::new();
        let mut args = RecObjs::new();
        let k = w + 1;
        for i in 0 .. n_ {
          let j = k + i;
          args.push(Box::new(self.export_term(self.heap[j as usize])))
        }
        RecObj::A(args)
      }
      _ => { panic!("*BAD TERM* {}", self.show_cell(x)) }
    }
  }
/**
    * builds an array of embedded arrays from a heap cell
    * representing a term for interaction with an external function
    * including a displayer
    */
builds an array of embedded arrays from a heap cell
representing a term for interaction with an external function
including a displayer
builds an array of embedded arrays from a heap cell representing a term for interaction with an external function including a displayer
pub fn export_term(&self, xi: Int) -> Term {
    let x = self.deref(xi);
    let t = tag_of(x);
    let w = detag(x);
    match t {
      C => { RecObj::S(self.get_sym(w)) }
      N => { RecObj::I(w) }
      V => { RecObj::S(format!("V{}", w)) }
      R => {
        let a_ = self.heap[w as usize];
        if A != tag_of(a_) {
          panic!("*** should be A, found={}", self.show_cell(a_))
        }
        let n_ = detag(a_);
        //let mut args = Vec::<Box::<RecObj>>::new();
        let mut args = RecObjs::new();
        let k = w + 1;
        for i in 0 .. n_ {
          let j = k + i;
          args.push(Box::new(self.export_term(self.heap[j as usize])))
        }
        RecObj::A(args)
      }
      _ => { panic!("*BAD TERM* {}", self.show_cell(x)) }
    }
  }
pub fn export_term ( & self , xi : Int ) -> Term { let x = self . deref ( xi ) ; let t = tag_of ( x ) ; let w = detag ( x ) ; match t { C => { RecObj :: S ( self . get_sym ( w ) ) } N => { RecObj :: I ( w ) } V => { RecObj :: S ( format ! ( " " w ) ) } R => { let a_ = self . heap [ w as usize ] ; if A != tag_of ( a_ ) { panic ! ( " " self show_cell ( a_ ) ) } let n_ = detag ( a_ ) ; //let mut args = Vec::<Box::<RecObj>>::new();
 let mut args = RecObjs :: new ( ) ; let k = w + 1 ; for i in 0 .. n_ { let j = k + i ; args . push ( Box :: new ( self . export_term ( self . heap [ j as usize ] ) ) ) } RecObj :: A ( args ) } _ => { panic ! ( " " self show_cell ( x ) ) } } }
builds an array of embedded arrays from a heap cell
 representing a term for interaction with an external function
 including a displayer
builds an array of embedded arrays from a heap cell representing a term for interaction with an external function including a displayer
&self
xi
Int
&self
xi
Int