fn expect<T, F>(&mut self, name: &str, get: F) -> Result<T, SexpError>
    where
        F: Fn(&Sexp) -> Result<T, SexpError>,
    {
        match self.iter.next() {
            Some(x) => get(x),
            None => Err(format!("missing {} field in {}", name, self.name).into()),
        }
    }
/// expect a named field, retrieved by `get`
expect a named field, retrieved by `get`
expect a named field retrieved by ` get `
fn expect<T, F>(&mut self, name: &str, get: F) -> Result<T, SexpError>
    where
        F: Fn(&Sexp) -> Result<T, SexpError>,
    {
        match self.iter.next() {
            Some(x) => get(x),
            None => Err(format!("missing {} field in {}", name, self.name).into()),
        }
    }
fn expect < T , F > ( & mut self , name : & str , get : F ) -> Result < T , SexpError > where F : Fn ( & Sexp ) -> Result < T , SexpError > , { match self . iter . next ( ) { Some ( x ) => get ( x ) , None => Err ( format ! ( " " name self name ) . into ( ) ) , } }
expect a named field, retrieved by `get`
expect a named field retrieved by ` get `
&mut self
name
&str
get
F