fostfox / lua-cpp-s101-integration

4 stars 0 forks source link

low LUA-JIT problems #36

Open fostfox opened 5 years ago

fostfox commented 5 years ago

Very long working in our version

function contains(value, array)
    for i = 1, #array do
        if array[i] == value then
            return true
        end
    end

    if type(value) == 'table' then
        for i = 1, #array do
            for j = 1, #value do
                if array[i] == value[j] then
                    return true
                end
            end
        end
    end

    return false
end