streetsofboston
01/30/2018, 7:48 PMTry
) as when using plain Rx?
E.g.
val plainObservable: Observable<Int> = .....
val res: Observable<Int> = plainObservable.map { x -> abs(x) }.flatMap { x -> Observables.fromIterable(List<Int>(9) { it * x }) }
...
val tryObservable: Observable<Try<Int>> = .....
val res: Observable<Try<Int>> = tryObservable.map__ { x -> abs(x) }.flatMap__ { x -> Observables__.fromIterable__(List<Int>(9) { it * x }) }
Where x
is just an Int
in both examples and where the methods ending in __
are some methods that work like the plain ones but only operate on values held by Try.Success
.