NPL.load("(gl)script/ide/STL.lua");
-- create stack
stack = commonlib.Stack:Create()
-- push values on to the stack
stack:commonlib.push("a", "b")
-- pop values
commonlib.stack:pop(2)
-- queue example
local q = commonlib.Queue.new(); q:pushleft("A"); log(q:popright())
Member Functions
Stack:Create
stack
local Stack = {};
commonlib.Stack = Stack
Create a Table with stack functions
syntax
function Stack:Create()
Queue.new
queue: from official LUA site
local Queue = {};
commonlib.Queue = Queue
syntax