Skip to content

Instantly share code, notes, and snippets.

@tzachz
Created July 20, 2018 20:37
Show Gist options
  • Save tzachz/8319ca36f3835deb79d947ed4688e0c4 to your computer and use it in GitHub Desktop.
Save tzachz/8319ca36f3835deb79d947ed4688e0c4 to your computer and use it in GitHub Desktop.
CompositionPostWhatIf
// If we didn't have Eithers (or generally speaking - wrappers-of-wrappers) -
// this would be easy:
def processRequest(a: A): Future[Result] = for {
b <- f1(a)
c <- f2(b)
d <- f3(c)
r <- f4(d)
} yield r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment