lua迭代器示例
function iter(t) local i = 0 local n = table.getn(t) return function () i = i + 1 if(i <=n ) then return t[i] else return nil end endendar = {1, 2, 3}ariter = iter(ar)while true do local e = ariter() if(e == nil) then break end print(e)end?