Class: Stack

Stack(listopt) → {Stack}

Manage stacks of data.

Constructor

new Stack(listopt) → {Stack}

Create a Stack instance.
Parameters:
Name Type Attributes Default Description
list Array <optional>
[] Genesis state for the Stack instance.
Source:
Returns:
Instance of the Stack.
Type
Stack

Methods

push(data) → {Number}

Push data onto the stack. Changes the Stack#frame and Stack#id.
Parameters:
Name Type Description
data Mixed Treated as a State.
Source:
Returns:
Resulting size of the stack.
Type
Number