Why rxScala Observable zipWith evaluates to Observable[Nothing]

49 views Asked by At

I tried the below:

import rx.lang.scala.Observable

Observable.from(Seq(1,2)).zipWith(Observable.from(Seq(3,4)))

When I show the resulting type I see:

((Int, Int) => Nothing) => Observable[Nothing]

I'm trying to get into an Observable[Int, Int] , what did I do wrong?

1

There are 1 answers

0
Alexey Romanov On BEST ANSWER

Observable[Int, Int] doesn't make sense: Observable only has a single type parameter. If you want Observable[(Int, Int)], you need zip. zipWith requires another argument: a function which tells you how to combine elements.