v2025.6.2
All Bundles

Stack

Growable stack of generics

Operations

Empty

Clears the vector

method : public : Empty() ~ Nil

IsEmpty

Checks to see if the stack is empty

method : public : IsEmpty() ~ Bool

Return

TypeDescription
Booltrue if empty, false otherwise

New

Default constructor

New()

Pop

Pops values from the stack

method : public : native : Pop(n:Int) ~ H

Parameters

NameTypeDescription
nIntnumber of items to pop

Return

TypeDescription
Hpopped valued, Nil if stack is empty

Pop

Pops a value from the stack

method : public : Pop() ~ H

Return

TypeDescription
Hpopped valued, Nil if stack is empty

Push

Pushes a value onto the stack

method : public : Push(value:H) ~ Nil

Parameters

NameTypeDescription
valueHto push

Size

Size of stack

method : public : Size() ~ Int

Return

TypeDescription
Intsize of stack

ToArray

Converts the stack into an object array

method : public : native : ToArray() ~ H[]

Return

TypeDescription
H[]object array

Top

Check the top of the stack

method : public : Top() ~ H

Return

TypeDescription
Hvalue on the top of stack, Nil if stack is empty