1 local co_time_tbl = {}
2 setmetatable(co_time_tbl, { __len = function(o)
3 local count = 0
4 for k, v in pairs(o) do
5 count = count + 1
6 end
7 return count
8 end
9……
pairs
Returns three values: the next function, the table t, and nil,
so that the construction
for k,v in pairs(t) do body end
will iterate over all key–value pairs of table t.
See functi ...……