function RxBrioUtils.flatCombineLatest(B)assert(type(B)=="\116\097\098\108\101","\066\097\100 \111\098\115\101\114\118\097\098\108\101\115")local v={}for B,C in pairs(B)do if Observable.isObservable(C)then v[B]=RxBrioUtils.flattenToValueAndNil(C)else v[B]=C end end return Rx.combineLatest(v)end

function RxBrioUtils.flatCombineLatest(observables)
	assert(type(observables) == "table", "Bad observables")

	local newObservables = {}
	for key, observable in pairs(observables) do
		if Observable.isObservable(observable) then
			newObservables[key] = RxBrioUtils.flattenToValueAndNil(observable)
		else
			newObservables[key] = observable
		end
	end

	return Rx.combineLatest(newObservables)
end
