A stack module for Lua.
I actually wrote this on the day before Tanabata, stumbled upon it again today (1/22/22). Hopefully someone finds a use for it. You can find the require ID here: https://www.roblox.com/library/8610400228/Stack-Implement-simple-stacks-into-Lua
How to use:
- Create a stack by assigning a variable to stack.new()
- Push the stack by calling stack.push(myStack, value)
- Pop the stack by assigning a variable to stack.pop(myStack). Remember that stacks are LIFO (Last in, first out).
I created this for toying around with a shunting-yard algorithm but it has other uses too, mostly for complex applications.
Enjoy.