Created
September 5, 2016 13:49
-
-
Save raulraja/6b825f53fc5c4370f488b200928cb461 to your computer and use it in GitHub Desktop.
Wrong order of effects
This file contains hidden or 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.ExecutionContext.global | |
| val af = fetchUserInfoService(userId) | |
| val bf = simpleDbLookups | |
| val cf = expensiveDbLookups | |
| val df = dbWriteOperations | |
| val ef = expensiveCpuOperations | |
| for { | |
| a <- af | |
| b <- bf | |
| c <- cf | |
| d <- df | |
| e <- ef | |
| } yield result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment