Answer by tharindu_DG for Scala map over a Future
It depends.val someFuture = Future { 1+1 }.map(elem => { println("mapping immediately") elem.toString})someFuture will be executed eagerly and the println will be executed.someFuture.onComplete {...
View ArticleScala map over a Future
In the following example, what is the expected behaviour?import scala.concurrent.ExecutionContext.Implicits.globalval someFuture = Future { 1+1 }.map(elem => { println("mapping immediately")...
View Article
More Pages to Explore .....