fn top(&mut self) -> Result<&mut Value> {
        match self.stack.last_mut() {
            // Since some operations like APPEND do things to the stack top, we
            // need to provide the reference to the "real" object here, not the
            // MemoRef variant.
            Some(&mut Value::MemoRef(n)) =>
                self.memo.get_mut(&n)
                         .map(|&mut (ref mut v, _)| v)
                         .ok_or_else(|| Error::Syntax(ErrorCode::MissingMemo(n))),
            Some(other_value) => Ok(other_value),
            None => Err(Error::Eval(ErrorCode::StackUnderflow, self.pos)),
        }
    }
// Mutably view the stack top item.
Mutably view the stack top item.
Mutably view the stack top item .
fn top(&mut self) -> Result<&mut Value> {
        match self.stack.last_mut() {
            // Since some operations like APPEND do things to the stack top, we
            // need to provide the reference to the "real" object here, not the
            // MemoRef variant.
            Some(&mut Value::MemoRef(n)) =>
                self.memo.get_mut(&n)
                         .map(|&mut (ref mut v, _)| v)
                         .ok_or_else(|| Error::Syntax(ErrorCode::MissingMemo(n))),
            Some(other_value) => Ok(other_value),
            None => Err(Error::Eval(ErrorCode::StackUnderflow, self.pos)),
        }
    }
fn top ( & mut self ) -> Result < & mut Value > { match self . stack . last_mut ( ) { // Since some operations like APPEND do things to the stack top, we // need to provide the reference to the "real" object here, not the // MemoRef variant. Some ( & mut Value :: MemoRef ( n ) ) => self . memo . get_mut ( & n ) . map ( | & mut ( ref mut v , _ ) | v ) . ok_or_else ( | | Error :: Syntax ( ErrorCode :: MissingMemo ( n ) ) ) , Some ( other_value ) => Ok ( other_value ) , None => Err ( Error :: Eval ( ErrorCode :: StackUnderflow , self . pos ) ) , } }
Mutably view the stack top item.
Mutably view the stack top item .
&mut self
&mut self