-
-
Save andreaslydemann/548e6e04108715269892373b694ed2cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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