function bindingPrototype.map(X,p)if config.typeChecks then assert(typeof(p)=="\102\117\110\099\116\105\111\110","\066\097\100 \097\114\103 \035\049 \116\111 \098\105\110\100\105\110\103\058\109\097\112\058 \101\120\112\101\099\116\101\100 \102\117\110\099\116\105\111\110")end local S=Binding.create(p(X:getValue()))S[InternalData].valueTransform=p S[InternalData].upstreamBinding=X return S end

function bindingPrototype:map(valueTransform)
	if config.typeChecks then
		assert(typeof(valueTransform) == "function", "Bad arg #1 to binding:map: expected function")
	end

	local binding = Binding.create(valueTransform(self:getValue()))

	binding[InternalData].valueTransform = valueTransform
	binding[InternalData].upstreamBinding = self

	return binding
end
