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