Created
July 2, 2020 14:37
-
-
Save akio0911/bf98791077978f3b9c1d4a1e8a1a65d4 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
| Observable | |
| .merge( | |
| stringStream.map { Value.string($0) }, | |
| intStream.map { Value.int($0) } | |
| ) | |
| .debounce(.seconds(1), scheduler: MainScheduler.instance) | |
| .subscribe(onNext: { | |
| switch $0 { | |
| case let .string(string): | |
| print(string) | |
| case let .int(int): | |
| print(int) | |
| } | |
| }) | |
| .disposed(by: disposeBag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment