Skip to content

Instantly share code, notes, and snippets.

@longliveenduro
Last active December 24, 2015 02:19
Show Gist options
  • Select an option

  • Save longliveenduro/6729942 to your computer and use it in GitHub Desktop.

Select an option

Save longliveenduro/6729942 to your computer and use it in GitHub Desktop.
def getArticleDetails(articleName: String): Future[Either[ArticleNotFound.type, ArticleDetails]] = {
for {
articleId <- articleService.getArticleIdByUniqueName(articleName).right
article <- articleService.getArticleDetails(articleId).right
} yield article
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment