# HG changeset patch # User John@Yosemite-PC # Date 1331869849 14400 # Node ID 8d3187b124430a780ea9517fe846a1025c940263 # Parent 8913e7d79cadb7131fe6677de7a742fcf01771e1 Start of sketch of a List object diff -r 8913e7d79cad -r 8d3187b12443 Lists.lua --- a/Lists.lua Thu Mar 15 22:58:54 2012 -0400 +++ b/Lists.lua Thu Mar 15 23:50:49 2012 -0400 @@ -93,6 +93,47 @@ reserveIdP = {} -- "reserve id present" local personName2id = {} -- given "name" get that person's id +List = +{ + id = 0 + name = "" + Sort = function() + end +} +function List:new() -- TODO: take args, build list + n = {} + setmetatable(n,self) + self.__index = self + return n +end +function List:HasID(id) + for i = 1,#self do + if id == self[i].id then + return true + end + end + return false +end +function List:GetID() + return self.id +end +function List:RemoveEntry() +end +function List:InsertEntry() +end +function List:OrderedIter() +end + + + + + + + + + + + function SelfDestruct() lists = {}