local j=script.Parent local g=j.Parent local B=require(g.t)local N=B.tuple(B.table,B.callback)local function f(j,g)assert(N(j,g))local B={}local f=1 for j,N in ipairs(j)do local i=g(N,j)if i~=nil then B[f]=i f+=1 end end return B end return f
local List = script.Parent

local Llama = List.Parent
local t = require(Llama.t)

local validate = t.tuple(t.table, t.callback)

local function map(list, mapper)
	assert(validate(list, mapper))

	local new = {}
	local index = 1

	for i, v in ipairs(list) do
		local value = mapper(v, i)

		if value ~= nil then
			new[index] = value
			index += 1
		end
	end

	return new
end

return map