function integer_iterator(a, b)
local n = a - 1
return function()
n = n + 1
if (n > b) then return nil
else return n
end
end
end
for n in integer_iterator(10, 15) do
print(n)
end
No comments:
Post a Comment