turtle/tlang: improve in_keys()

The function references should probably be replaced with the Lua-y form
This commit is contained in:
cron 2020-11-22 06:52:20 +00:00
parent 1198d63ad5
commit a3018c2a31

View File

@ -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