Jump to content

Module:count

From Wiktionary, the free dictionary

Creates Count object (map from values to integers).


local Count = {}

function Count:__index(key)
	self[key] = 0
	return 0
end

function Count:new()
	return setmetatable({}, self)
end

return Count