Created
January 5, 2020 01:58
-
-
Save djspiewak/8a2e6e9490f12e92f296d0b18f0308e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> run(F.handleErrorWith(F.map(fa)(_.asRight[Int]))(e => F.pure(e.asLeft[String]))) | |
res2: ce3.ExitCase[Option,Int,Either[Int,String]] = Errored(42) | |
scala> run(F.handleErrorWith(fa.map(_.asRight[Int]))(e => F.pure(e.asLeft[String]))) | |
handling 42 | |
res3: ce3.ExitCase[Option,Int,Either[Int,String]] = Completed(Some(Left(42))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment