|
local N <const> = 0x1 << 30
local index_count = 0
local meta = {
__index = function(meta, key)
index_count = index_count + 1
if index_count <= N then
return "a"
else
return "bb"
end
end,
}
local t = setmetatable({}, meta)
print(table.concat(t, "", 1, N))