Skip to content

Instantly share code, notes, and snippets.

@andreaslydemann
Created January 20, 2019 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreaslydemann/5d604b9aa14c4485f008aa65dd613806 to your computer and use it in GitHub Desktop.
Save andreaslydemann/5d604b9aa14c4485f008aa65dd613806 to your computer and use it in GitHub Desktop.
import RxSwift
let disposeBag = DisposeBag()
Observable.of(1, 2, 3)
.map { $0 * 10 }
.subscribe(onNext: {
print($0)
})
.disposed(by: disposeBag)
// Output:
// 10
// 20
// 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment