stack: stack

View source: R/01_constructors.r

stackR Documentation

stack

Description

A stack is a "last in, first out" (LIFO) abstract data type. New items are added to the front of the stack via push(). Items are removed from the stack at the front via pop().

The implementation is a head/tail doubly linked list.

Usage

stack()

Details

A constructor for a stack.

Examples

## Not run: 
library(dequer)
s <- stack()
s

## End(Not run)


dequer documentation built on March 18, 2022, 5:45 p.m.