Skip to content

Instantly share code, notes, and snippets.

@javipacheco
Last active November 9, 2017 14:09
Show Gist options
  • Save javipacheco/4c82f33a7b6023ce0b9d96e08f12474b to your computer and use it in GitHub Desktop.
Save javipacheco/4c82f33a7b6023ce0b9d96e08f12474b to your computer and use it in GitHub Desktop.
EitherMonad
Either.monad<AkmeException>().binding {
uiService.showLoading().bind()
val news = apiService.getNews().bind()
uiService.showNews(news).bind()
yields(Unit)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment