mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +01:00
Add table.ivalues
This commit is contained in:
parent
e84f090d03
commit
b1ca160751
@ -558,6 +558,14 @@ function unique(table)
|
|||||||
return keys(set(table))
|
return keys(set(table))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ivalues(table)
|
||||||
|
local index = 0
|
||||||
|
return function()
|
||||||
|
index = index + 1
|
||||||
|
return table[index]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function rpairs(table)
|
function rpairs(table)
|
||||||
local index = #table
|
local index = #table
|
||||||
return function()
|
return function()
|
||||||
|
Loading…
Reference in New Issue
Block a user