function Functional.FilterMap(j,Z)local h={}for n=1,#j,1 do local W=j[n]local S=Z(W,n)if S~=nil then table.insert(h,S)end end return h end
--[[
	Create a copy of a list doing a combination filter and map.

	If callback returns nil for any item, it is considered filtered from the
	list. Any other value is considered the result of the 'map' operation.
]]
function Functional.FilterMap(list, callback)
	local new = {}

	for key = 1, #list do
		local value = list[key]
		local result = callback(value, key)

		if result ~= nil then
			table.insert(new, result)
		end
	end

	return new
end
