Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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