Created
May 22, 2020 22:14
-
-
Save dkomanov/6c5c21259ccb7ab6b2650b5d5549758c to your computer and use it in GitHub Desktop.
[writing-async-app-in-scala-part-1] for-comprehensions 1
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
def getMovie: Future[Movie] | |
def getActors(movie: Movie): Future[Seq[Actor]] | |
def getPlot(movie: Movie): Future[MoviePlot] | |
for { | |
movie <- getMovie | |
actors <- getActors(movie) | |
plot <- getPlot(movie) | |
} yield MovieDescription(movie, actors, plot) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment