Anonymous

Module:FunList/Iterators: Difference between revisions

From Melvor Idle
Created page with "enumerable = {} local enumerable = {} local enumerable_mt = { __index = enumerable, __pairs = function(t) return t:overridePairs()end } function enumerable.new(tbl) local self = setmetatable({}, enumerable_mt) self.data = tbl self.current = nil self.index = nil return self end function enumerable:moveNext() -- Grab the next index for the internal table. local ix = self.index ix = next(self.data, ix) self.index = ix -- If the index exist, we have succ..."
(Created page with "enumerable = {} local enumerable = {} local enumerable_mt = { __index = enumerable, __pairs = function(t) return t:overridePairs()end } function enumerable.new(tbl) local self = setmetatable({}, enumerable_mt) self.data = tbl self.current = nil self.index = nil return self end function enumerable:moveNext() -- Grab the next index for the internal table. local ix = self.index ix = next(self.data, ix) self.index = ix -- If the index exist, we have succ...")
(No difference)
2,873

edits