blob: 196453a4ac988b2f455a84895010854a16f706ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
local utils = {}
local function reversedipairsiter(t, i)
i = i - 1
if i ~= 0 then
return i, t[i]
end
end
utils.reversed_ipairs = function(t)
return reversedipairsiter, t, #t + 1
end
return utils
|