Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhilvijayan05/63d73b2a56a1dc000fe988822c2e4926 to your computer and use it in GitHub Desktop.
Save akhilvijayan05/63d73b2a56a1dc000fe988822c2e4926 to your computer and use it in GitHub Desktop.
import cats.syntax.traverse._
import cats.instances.future._
import cats.syntax.option._
import cats.instances.option._
val optionalValue: Option[Int] = 35.some
val finalResult: Future[Option[Int]] = optionalValue.traverse(value => Future(value + 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment