:
List((b1,2.03,b1), (c0,3.5,c0), (c0,3.5,c0), (b0,4.03,b0), (a0,4.1,a0), (a1,4.31,a1))
stdout ( "a" !).
: " , "?
import scala.concurrent.{Future, Await}
import scala.concurrent.duration._
import akka.util.Timeout
import scala.concurrent.ExecutionContext.Implicits.global
implicit val timeout = Timeout(5.seconds)
val x = Future(List(("a0", 4.1, "a0"), ("a1", 4.31, "a1")))
val y = Future(List(("b0", 4.03, "b0"), ("b1", 2.03, "b1")))
val z = Future(List(("c0", 3.5, "c0"), ("c0", 3.5, "c0")))
val answer = for{
a <- x.mapTo[List[(String, Double, String)]]
b <- y.mapTo[List[(String, Double, String)]]
c <- z.mapTo[List[(String, Double, String)]]
} yield a ++ b ++ c sortBy(_._2)
answer.foreach { res =>
println(res)
}
Await.result(answer, 1.minute)
Thread.sleep(1000)