-6
我无法理解如何在将来使用flatMap。 '因为'看起来很好。在期货中使用flatmap的示例
object ConcurrencyExample extends App {
val gpf= Future {gpf operations}
val ccf = Future{ccf operations}
//how can I convert this for to flatMap?
val atbf = for {g <- gpf
c <- ccf } yield {atbf operations}
Await.result(atbf,1000 millis)
}
'gpf.flatMap {_ => CCF} .MAP {_ => ATBF }' – Dima