function Rx.merge(O)assert(type(O)=="\116\097\098\108\101","\066\097\100 \111\098\115\101\114\118\097\098\108\101\115")for O,X in pairs(O)do assert(Observable.isObservable(X),"\078\111\116 \097\110 \111\098\115\101\114\118\097\098\108\101")end return Observable.new(function(X)local q=Maid.new()for O,P in pairs(O)do q:GiveTask(P:Subscribe(X:GetFireFailComplete()))end return q end)end
--[=[
	https://rxjs-dev.firebaseapp.com/api/operators/merge

	@param observables { Observable }
	@return Observable
]=]
function Rx.merge(observables)
	assert(type(observables) == "table", "Bad observables")

	for _, item in pairs(observables) do
		assert(Observable.isObservable(item), "Not an observable")
	end

	return Observable.new(function(sub)
		local maid = Maid.new()

		for _, observable in pairs(observables) do
			maid:GiveTask(observable:Subscribe(sub:GetFireFailComplete()))
		end

		return maid
	end)
end
