Skip to content

Instantly share code, notes, and snippets.

@nicholasren
Last active August 29, 2015 14:01
Show Gist options
  • Save nicholasren/da1bbc3984909793f12e to your computer and use it in GitHub Desktop.
Save nicholasren/da1bbc3984909793f12e to your computer and use it in GitHub Desktop.
scala training example- function composition
val userFetcher: String => User = {
//...
}
val commentFetcher: User => List[Comment] = {
//...
}
val userCommentFetcher : String => List[Comment] = userFetcher andThen commentFetcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment