Created
September 10, 2017 10:13
-
-
Save charlag/ae6ded9306b417482d5adb9d3f7b8f7a 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
val transformer = store.publish { upstream → | |
Observable.merge( | |
upstream.ofEventType<NameChangeEvent>.switchMap { (_, state, _) → | |
api.validate(state.name) | |
} | |
.map { apiResult → ValidationResult(…) }, | |
upstream.ofEventType<OtherEvent>.map { …. } | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment