Skip to content

Instantly share code, notes, and snippets.

@SebastianAas
Last active January 21, 2021 12:33
Show Gist options
  • Save SebastianAas/2ce7afd52f538fdc94fd5c3ba8c31b9e to your computer and use it in GitHub Desktop.
Save SebastianAas/2ce7afd52f538fdc94fd5c3ba8c31b9e to your computer and use it in GitHub Desktop.
Example 2
def example2() = {
val a = Future(0.5)
val b = Future(Set(1, 2, 3))
for {
x <- SetF.lift(a)
y <- SetF(b)
} yield {
x * y
}
}
// Result: Future[Set(0.5, 1.0, 1.5)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment