Skip to content

Instantly share code, notes, and snippets.

@dkomanov
Created May 22, 2020 22:02
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/4bacdb3c2a52467c63049c05114a2b24 to your computer and use it in GitHub Desktop.
Save dkomanov/4bacdb3c2a52467c63049c05114a2b24 to your computer and use it in GitHub Desktop.
[writing-async-app-in-scala-part-1] multiple statements mixed Boolean and Future[Boolean]
def condition1: Boolean = ...
def condition2: 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