Skip to content

Instantly share code, notes, and snippets.

@joe-gaudet-hs
Created May 4, 2016 18:25
Show Gist options
  • Save joe-gaudet-hs/a5e6300be40bc0d76c9d411d131ca563 to your computer and use it in GitHub Desktop.
Save joe-gaudet-hs/a5e6300be40bc0d76c9d411d131ca563 to your computer and use it in GitHub Desktop.
val eventuallyFoo = ServiceOne.get // can be fired in parallel
val eventuallyBar = ServiceTwo.get
for {
foo <- eventuallyFoo
bar <- eventuallyBar
baz <- DB.get(foo.id, bar.id)
} yield baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment