local function E(E,s)local c=type(E)assert(c=="\116\097\098\108\101","\101\120\112\101\099\116\101\100 \097 \116\097\098\108\101 \102\111\114 \102\105\114\115\116 \097\114\103\117\109\101\110\116\044 \103\111\116 "..c)local H=type(s)assert(H=="\102\117\110\099\116\105\111\110","\101\120\112\101\099\116\101\100 \097 \102\117\110\099\116\105\111\110 \102\111\114 \115\101\099\111\110\100 \097\114\103\117\109\101\110\116\044 \103\111\116 "..H)local l={}local K=1 for c=1,#E,1 do if s(E[c],c)then l[K]=E[c]K=K+1 end end return l end return E

local function filter(list, filterer)
	local listType = type(list)
	assert(listType == "table", "expected a table for first argument, got " .. listType)

	local filtererType = type(filterer)
	assert(filtererType == "function", "expected a function for second argument, got " .. filtererType)
	
	local new = {}
	local index = 1

	for i = 1, #list do
		if filterer(list[i], i) then
			new[index] = list[i]
			index = index + 1
		end
	end
	
	return new
end

return filter