collapsed DSCP stats into other (#4641)

This commit is contained in:
gabryon99 2020-10-29 14:23:12 +01:00
parent c6797f4476
commit 888cbd77c2
3 changed files with 86 additions and 4 deletions

View file

@ -3948,6 +3948,19 @@ end
-- ###########################################
--- Fold right table with a custom function
--- @param t table Table to fold
--- @param func function Function to execute on table values
--- @param val any The returned default value
function table.foldr(t, func, val)
for i,v in pairs(t) do
val = func(val, v)
end
return val
end
-- ###########################################
function table.has_key(table, key)
return table[key] ~= nil
end