LuaRT should give the possibility to iterate through Objects with the global each() function.
Here is an example for such functionnality :
Powers = Object{}
function Powers:constructor(base,limit)
self.base = base
self.limit = limit or math.huge
end
function Powers:each()
local i = -1
return function()
i = i+1
if i <= self.limit then
return self.base ^ i
end
end
end
local p = Powers(2, 10)
for x in p:each() do
print(x)
end