local T=script.Parent local A=T.Parent local u=require(A.t)local S=u.tuple(u.table,u.callback)local function b(T,A)assert(S(T,A))local u={}for T,S in pairs(T)do local b,p=A(S,T)u[p or T]=b end return u end return b
local Dictionary = script.Parent

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

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

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

	local new = {}

	for key, value in pairs(dictionary) do
		local newValue, newKey = mapper(value, key)
		new[newKey or key] = newValue
	end

	return new
end

return map