Empties the stack, pops all items
Reads and removes an array of items from the stack,
pops an item from stack
Appends an item to the stack
Appends an array of items to the stack
Number of items in stack
Stack!ubyte stack = new Stack!ubyte; //`Stack.push` and `Stack.pop` stack.push(0); stack.push([1, 2]); assert(stack.pop == 2); assert(stack.pop(2) == [1, 0]); stack.push([1, 0]); assert(stack.pop!(true)(2) == [1, 0]); //`Stack.clear` && `Stack.count` stack.push(0); assert(stack.count == 1); stack.clear; assert(stack.count == 0); stack.destroy;
A basic stack with push, and pop