Skip to content

Instantly share code, notes, and snippets.

@dkomanov
Created May 22, 2020 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkomanov/15a87ef7647b80e7a0451bc5a5ab331e to your computer and use it in GitHub Desktop.
Save dkomanov/15a87ef7647b80e7a0451bc5a5ab331e to your computer and use it in GitHub Desktop.
[writing-async-app-in-scala-part-1] multiple statement
def condition1: Future[Boolean] = ...
def condition2: Future[Boolean] = ...
def condition3: Future[Boolean] = ...
val condition = condition1 && (condition2 || condition3)
condition.flatMap(
if (_)
...
else
...
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment