Created
August 29, 2017 13:39
-
-
Save fayimora/5b91cb1e70c3ab15c51de9da4b48abe6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
val x = 5 | |
val y = 6 | |
def makeFuture(text: String) = Future { println(text) } | |
for { | |
foo <- makeFuture("hi") if x == 5 | |
bar <- makeFuture("yo") if y == 4 | |
yar <- makeFuture("whattup") | |
} yield () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment