Created
July 31, 2018 10:56
-
-
Save JorgeCastilloPrz/8c04cc2a0a3c035beff66c0a940bbd3b to your computer and use it in GitHub Desktop.
MaybeRuntimeTest.kt
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
| @JvmStatic | |
| fun main(args: Array<String>): Unit { | |
| val user1 = User(UserId("user1")) | |
| val user2 = User(UserId("user2")) | |
| val user3 = User(UserId("unknown user")) | |
| val maybeModule = Module(MaybeK.async()) | |
| maybeModule.run { | |
| repository.allTasksByUser(user1).fix().maybe.subscribe({ println(it) }, { println(it) }) | |
| repository.allTasksByUser(user2).fix().maybe.subscribe({ println(it) }, { println(it) }) | |
| repository.allTasksByUser(user3).fix().maybe.subscribe({ println(it) }, { println(it) }) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment