Skip to content

Instantly share code, notes, and snippets.

@d-date
Last active September 2, 2019 05:03
Show Gist options
  • Save d-date/4eca034ed2e274c9727b599f6f11ab87 to your computer and use it in GitHub Desktop.
Save d-date/4eca034ed2e274c9727b599f6f11ab87 to your computer and use it in GitHub Desktop.
let of = Observable.of(1,2,3)
.do(onNext: { print($0) })
let just = Observable.just(4)
.do(onNext: { print($0) })
let error = Observable<Any?>.error(FakeError())
.do(onError: { print($0) })
Observable.zip(of, just, error)
.subscribe()
.disposed(by: disposeBag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment