scan improvements

This commit is contained in:
Manuel Simon Hirsig
2015-10-03 01:25:05 +02:00
parent bf12b438e5
commit 951498377c
8 changed files with 124 additions and 155 deletions
+10
View File
@@ -83,4 +83,14 @@ function Aux.util.all(xs, p)
holds = holds and p(x)
end
return holds
end
function Aux.util.set_filter(set, p)
filtered = {}
for x, _ in pairs(set) do
if p(x) then
Aux.util.set_add(filtered, x)
end
end
return filtered
end