local R=script.Parent local p=R.Parent local E=require(p.t)local d=E.tuple(E.table,E.callback)local function t(R,p)assert(d(R,p))local E={}for R,d in pairs(R)do local t,N=p(d,R)E[N or R]=t end return E end return t
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