function Rx.map(W)assert(type(W)=="\102\117\110\099\116\105\111\110","\066\097\100 \112\114\111\106\101\099\116 \099\097\108\108\098\097\099\107")return function(y)assert(Observable.isObservable(y),"\066\097\100 \111\098\115\101\114\118\097\098\108\101")return Observable.new(function(d)return y:Subscribe(function(...)d:Fire(W(...))end,d:GetFailComplete())end)end end

function Rx.map(project)
	assert(type(project) == "function", "Bad project callback")

	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

		return Observable.new(function(sub)
			return source:Subscribe(function(...)
				sub:Fire(project(...))
			end, sub:GetFailComplete())
		end)
	end
end
