Add table.ivalues

This commit is contained in:
Lars Mueller 2021-11-13 16:34:49 +01:00
parent e84f090d03
commit b1ca160751

@ -558,6 +558,14 @@ function unique(table)
return keys(set(table))
end
function ivalues(table)
local index = 0
return function()
index = index + 1
return table[index]
end
end
function rpairs(table)
local index = #table
return function()