local function h(h,c)local j={}local f=1 for M=1,#h,1 do local P=h[M]if c(P,M)then j[f]=P f=f+1 end end return j end return h

local function filter(list, callback)
	local new = {}
	local index = 1

	for i = 1, #list do
		local value = list[i]
		if callback(value, i) then
			new[index] = value
			index = index + 1
		end
	end

	return new
end

return filter
