Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import RxSwift
let disposeBag = DisposeBag()
let oldXmenMovies = Observable.of("X-Men", "X-Men United", "The Last Stand")
let newXmenMovies = Observable.of("First Class", "Days of Future Past", "Apocalypse")
oldXmenMovies.concat(newXmenMovies)
.subscribe(onNext: { movie in
print(movie)
})
.disposed(by: disposeBag)
// Output:
// X-Men
// X-Men United
// The Last Stand
// First Class
// Days of Future Past
// Apocalypse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment