9 lines
No EOL
141 B
Lua
9 lines
No EOL
141 B
Lua
return function(tbl)
|
|
local length = #tbl
|
|
for i = 1, length do
|
|
local v = tbl[i]
|
|
tbl[v] = i
|
|
end
|
|
|
|
return tbl
|
|
end |