feat(utils): add Table.contain

This commit is contained in:
Kazhnuz 2021-03-22 15:54:37 +01:00
parent d57d5a7c0f
commit cb7b087d5f

View file

@ -24,6 +24,15 @@
local Table = {}
function Table.contain(table, content)
for k, v in ipairs(table) do
if (v == content) then
return true
end
end
return false
end
function Table.reduce(list, fn)
local acc
for k, v in ipairs(list) do