Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akhilvijayan05/d7142540da837dd8fdca3786cec7fde2 to your computer and use it in GitHub Desktop.
Save akhilvijayan05/d7142540da837dd8fdca3786cec7fde2 to your computer and use it in GitHub Desktop.
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