local Rx = require 'Rx'
local Observable = Rx.Observable

local combineLatest = Rx.Observable.combineLatest

--------------------------------------------------------------------------------

return function(self, resultSelectorOrObservable, ... )

    if Observable:isClassOf(resultSelectorOrObservable) then
        return combineLatest(self, resultSelectorOrObservable, ...)
    else
        return combineLatest(resultSelectorOrObservable, self, ...)
    end

end
