missing definition

This commit is contained in:
Kartik K. Agaram 2023-04-17 21:10:17 -07:00
parent 912ca601ab
commit d929b1c1d7
1 changed files with 8 additions and 0 deletions

View File

@ -229,6 +229,14 @@ function live.get_binding(name)
end
end
function table.find(h, x)
for k,v in pairs(h) do
if v == x then
return k
end
end
end
-- Wrapper for Lua's weird evaluation model.
-- Lua is persnickety about expressions vs statements, so we need to do some
-- extra work to get the result of an evaluation.