1
1
mirror of https://github.com/qvacua/vimr.git synced 2025-01-01 02:02:38 +03:00
vimr/VimR/RxSwiftUtils.swift

20 lines
381 B
Swift

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
import Foundation
import RxSwift
extension Array {
/// This method only makes sense for `Array<Observable<Any>>`.
/// - Returns: Merged observables
func toMergedObservables() -> Observable<Any> {
return self
.flatMap { $0 as? Observable<Any> }
.toObservable()
.flatMap { $0 }
}
}