Skip to content

Instantly share code, notes, and snippets.

@zsoltk
Created October 9, 2018 22:51
Show Gist options
  • Save zsoltk/deff65652e8dff7d5fc713aa736e2115 to your computer and use it in GitHub Desktop.
Save zsoltk/deff65652e8dff7d5fc713aa736e2115 to your computer and use it in GitHub Desktop.
// Wishes -> Feature
val wishes: ObservableSource<Wish> = Observable.just(Wish.SomeWish)
val feature: Consumer<Wish> = SomeFeature()
val disposable = Observable.wrap(wishes).subscribe(feature)
// Feature -> State consumer
val feature: ObservableSource<State> = SomeFeature()
val logger: Consumer<State> = Consumer { System.out.println(it) }
val disposable = Observable.wrap(feature).subscribe(logger)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment