Learn R Programming

flifo (version 0.1.5)

is.stack: Stacks - creation and class

Description

The fifo, lifo, and nino functions create 'First In First Out', 'Last In First Out', and 'Not In or Never Out' stacks, respectively.

Usage

is.stack(x)

is.fifo(x)

is.lifo(x)

is.nino(x)

# S3 method for stack as.list(x, ...)

fifo(max_length = Inf, max_size = Inf)

lifo(max_length = Inf, max_size = Inf)

nino(max_length = Inf, max_size = Inf)

Arguments

x

An object to be tested or coerced.

...

Additional arguments.

max_length

numeric. The maximum (infinite by default) number of objects the stack can contain.

max_size

numeric. The maximum (infinite by default) size of the stack, in octets.

Value

is.xxx functions return a logical.

fifo, lifo, and nino return an empty FIFO, LIFO, or NINO stack.

See Also

push, pop.