pub fn rev(self) -> Result<Self, VmError> {
        if !self.iter.is_double_ended() {
            return Err(VmError::panic(format!(
                "`{:?}` is not a double-ended iterator",
                self
            )));
        }

        Ok(Self {
            iter: match self.iter {
                // NB: reversing a reversed iterator restores the original
                // iterator.
                IterRepr::Rev(rev) => rev.iter,
                iter => IterRepr::Rev(Box::new(Rev { iter })),
            },
        })
    }
/// Map the iterator using the given function.
Map the iterator using the given function.
Map the iterator using the given function .
pub fn rev(self) -> Result<Self, VmError> {
        if !self.iter.is_double_ended() {
            return Err(VmError::panic(format!(
                "`{:?}` is not a double-ended iterator",
                self
            )));
        }
        Ok(Self {
            iter: match self.iter {
                // NB: reversing a reversed iterator restores the original
                // iterator.
                IterRepr::Rev(rev) => rev.iter,
                iter => IterRepr::Rev(Box::new(Rev { iter })),
            },
        })
    }
pub fn rev ( self ) -> Result < Self , VmError > { if ! self . iter . is_double_ended ( ) { return Err ( VmError :: panic ( format ! ( " " self ) ) ) ; } Ok ( Self { iter : match self . iter { // NB: reversing a reversed iterator restores the original // iterator. IterRepr :: Rev ( rev ) => rev . iter , iter => IterRepr :: Rev ( Box :: new ( Rev { iter } ) ) , } , } ) }
Map the iterator using the given function.
Map the iterator using the given function .
self
self