Skip to content

Instantly share code, notes, and snippets.

@longliveenduro
Created September 27, 2013 15:36
Show Gist options
  • Select an option

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

Select an option

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