turtle/tlang: improve in_keys()
The function references should probably be replaced with the Lua-y form
This commit is contained in:
parent
1198d63ad5
commit
a3018c2a31
@ -12,12 +12,7 @@ local function in_list(value, list)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function in_keys(value, list)
|
local function in_keys(value, list)
|
||||||
for k, v in pairs(list) do
|
return list[value] ~= nil
|
||||||
if k == value then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- state
|
-- state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user