I have this `Either` class as a result of my `Serv...
# rx
j
I have this
Either
class as a result of my
Service
Copy code
sealed class Either<out L, out R> {
    class Left<out L>(val a: L) : Either<L, Nothing>()

    class Right<out R>(val b: R) : Either<Nothing, R>()

    val isRight get() = this is Right<R>
    val isLeft get() = this is Left<L>

    fun <L> left(a: L) = Left(a)
    fun <R> right(b: R) = Right(b)

    fun either(fnL: (L) -> Any, fnR: (R) -> Any): Any =
        when (this) {
            is Left -> fnL(a)
            is Right -> fnR(b)
        }
}
And the result of my service is
Single<Either<Failure,List<MyClass>>
so, my question is, if I do this :
Copy code
disposable = getPews.execute(pews)
            .subscribeOn(<http://Schedulers.io|Schedulers.io>())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(
                { result ->

                },
                { error ->

                })