Skip to content

Instantly share code, notes, and snippets.

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")
.subscribe(onNext: { movie in
.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