Anonymous

Module:FunList: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 61: Line 61:
assert(item)
assert(item)
table.insert(self.mytable, item)
table.insert(self.mytable, item)
return self
end
end


Line 162: Line 164:
end
end
return l
return l
end
function funlist:prepend(item)
assert(item)
local newtbl = {}
table.insert(newtbl, item)
table.move(self.mytable, 1, #self.mytable, 2, newtbl)
self.mytable = newtbl
return self
end
end


2,875

edits