mirror of
https://github.com/qvacua/vimr.git
synced 2025-01-03 19:37:56 +03:00
20 lines
381 B
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 }
|
||
|
}
|
||
|
}
|