You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
629 B

5 years ago
  1. //
  2. // mergeWith.swift
  3. // RxSwiftExt
  4. //
  5. // Created by Joan Disho on 12/05/18.
  6. // Copyright © 2018 RxSwift Community. All rights reserved.
  7. //
  8. import Foundation
  9. import RxSwift
  10. extension Observable {
  11. /**
  12. Merges elements from the observable sequence with those of a different observable sequences into a single observable sequence.
  13. - parameter with: Other observables.
  14. - returns: The observable sequence that merges the elements of the observable sequences.
  15. */
  16. public func merge(with others: Observable<Element>...) -> Observable<Element> {
  17. return Observable.merge([self] + others)
  18. }
  19. }