Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (13 sloc) 502 Bytes
import scala.concurrent.ExecutionContext.Implicits._
import scala.concurrent.Future
object Example_00_FuturesForComprenhension extends Example_00_Futures {
def findFullProfile(user: String): Future[String] = {
val fRankingForUser = fRanking(user)
val fbasicProfileForUser = fBasicProfile(user)
for {
ranking <- fRankingForUser
basicProfile <- fbasicProfileForUser
lastMedal <- fLastMedalInLevel(basicProfile)
} yield s"$basicProfile;$ranking;$lastMedal"
}
}