Created
May 5, 2019 18:16
-
-
Save akhilvijayan05/d7142540da837dd8fdca3786cec7fde2 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
import cats.data.EitherT | |
import cats.syntax.either._ | |
val eitherValue: Either[Boolean, Int] = 35.asRight[Boolean] | |
val futureEitherValue: Future[Either[Boolean, Int]] = Future(eitherValue) | |
val eitherTValue: EitherT[Future, Boolean, Int] = EitherT(futureEitherValue) | |
val extractedFutureValue: Future[Either[Boolean, Int]] = eitherTValue.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment