mirror of https://github.com/kepler155c/opus
array api
This commit is contained in:
parent
e5312ca6ab
commit
cd6ed79d11
|
@ -0,0 +1,13 @@
|
|||
local Array = { }
|
||||
|
||||
function Array.filter(it, f)
|
||||
local ot = { }
|
||||
for _,v in pairs(it) do
|
||||
if f(v) then
|
||||
table.insert(ot, v)
|
||||
end
|
||||
end
|
||||
return ot
|
||||
end
|
||||
|
||||
return Array
|
Loading…
Reference in New Issue