function Functional.Filter(M,B)local S={}for q=1,#M,1 do local Q=M[q]if B(Q,q)then table.insert(S,Q)end end return S end

function Functional.Filter(list, callback)
	local new = {}

	for key = 1, #list do
		local value = list[key]
		if callback(value, key) then
			table.insert(new, value)
		end
	end

	return new
end
