Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试了以下方法:
import rx.lang.scala.Observable Observable.from(Seq(1,2)).zipWith(Observable.from(Seq(3,4)))
当我显示结果类型时,我看到:
((Int, Int) => Nothing) => Observable[Nothing]
我试图进入一个Observable[Int, Int],我做错了什么?
Observable[Int, Int]
Observable[Int, Int]没有意义:Observable只有一个类型参数。如果你想Observable[(Int, Int)],你需要zip。zipWith需要另一个参数:一个告诉你如何组合元素的函数。
Observable
Observable[(Int, Int)]
zip
zipWith