Categories
scala

Scala for-comprehension with concurrently running futures

Can you tell what’s the difference between the following two? If yes, then you’re great and you don’t need to read further. Version 1: val milkFuture = future { getMilk() } val flourFuture = future { getFlour() } for { milk <- milkFuture flour <- flourFuture } yield (milk + flour) Version 2: for { […]