pub fn new(s: &'a Sexp, name: &str) -> Result<IterAtom<'a>, SexpError> {
        let v = s.list()?;
        let mut i = v.iter();
        let st = match i.next() {
            None => return Err(format!("missing first element {} in list {}", name, s).into()),
            Some(e) => e.string()?,
        };
        if st != name {
            return Err(format!("list {} doesn't start with {}, but with {}", s, name, st).into());
        }
        let i = i.peekable();
        Ok(IterAtom {
            name: name.into(),
            iter: i,
        })
    }
/// deconstruct a `Sexp` that is a list and starts with 'name'
deconstruct a `Sexp` that is a list and starts with 'name'
deconstruct a ` Sexp ` that is a list and starts with ' name '
pub fn new(s: &'a Sexp, name: &str) -> Result<IterAtom<'a>, SexpError> {
        let v = s.list()?;
        let mut i = v.iter();
        let st = match i.next() {
            None => return Err(format!("missing first element {} in list {}", name, s).into()),
            Some(e) => e.string()?,
        };
        if st != name {
            return Err(format!("list {} doesn't start with {}, but with {}", s, name, st).into());
        }
        let i = i.peekable();
        Ok(IterAtom {
            name: name.into(),
            iter: i,
        })
    }
pub fn new ( s : & ' a Sexp , name : & str ) -> Result < IterAtom < ' a > , SexpError > { let v = s . list ( ) ? ; let mut i = v . iter ( ) ; let st = match i . next ( ) { None => return Err ( format ! ( " " name s ) . into ( ) ) , Some ( e ) => e . string ( ) ? , } ; if st != name { return Err ( format ! ( " " s name st ) . into ( ) ) ; } let i = i . peekable ( ) ; Ok ( IterAtom { name : name . into ( ) , iter : i , } ) }
deconstruct a `Sexp` that is a list and starts with 'name'
deconstruct a ` Sexp ` that is a list and starts with ' name '
s
&'a Sexp
name
&str