% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stack.R
\name{peek}
\alias{peek}
\alias{pop}
\alias{push<-}
\title{A little stack.}
\usage{
peek(x, an, n = 1L)

pop(x, an, n = 1L)

push (x, an) <- value
}
\arguments{
\item{x}{the object}

\item{an}{attribute holding the stack}

\item{n}{numer of element to peek at and numer of elements to pop (delete), respectively}

\item{value}{list of things to push on the stack.}
}
\value{
\code{push} and \code{pop}: the object with stack in list \code{an} pushed/popped by the \code{n} elements

\code{peek}: the \code{n}th stack element (without popping!)
}
\description{
TODO: implement as reference class?
Note: \code{pop} only removes elements. To retrieve them, use \code{peek}.
}
\author{
Claudia Beleites
}
