Slide 37
Slide 37 text
ׁח
fun c(): Observable
= Observable.create {
it.onNext(“Hello, world”)
it.onError(RuntimeException())
}
c().either().subscribe({ either ->
either.fold({
/* left, “it” is Throwable */
}, {
/* right, “it” is String */
})
}, {
/* Error */
})
䭁䓸ꟼ侧דFJUIFSؔلٖ٦ةך״ֲח䮶莸ֲ