Created
May 25, 2020 16:34
-
-
Save dkomanov/ea89072011a974abf5a2b60260850b4c to your computer and use it in GitHub Desktop.
[writing-async-app-in-scala-part-3] benchmark
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
var future = Future.successful(0) | |
for (_ <- 1 to 100) { | |
future = future.map(v => v + 1) | |
} | |
require(Await.result(future, 10.seconds) == 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment