mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-29 03:53:38 +03:00
20 lines
376 B
Swift
20 lines
376 B
Swift
/**
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
* See LICENSE
|
|
*/
|
|
|
|
import Cocoa
|
|
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 }
|
|
}
|
|
}
|