Skip to content

Instantly share code, notes, and snippets.

@lforite
Created December 11, 2019 08:48
Show Gist options
  • Select an option

  • Save lforite/952b3802028d8dcc9b477f2e525de240 to your computer and use it in GitHub Desktop.

Select an option

Save lforite/952b3802028d8dcc9b477f2e525de240 to your computer and use it in GitHub Desktop.
val context: String = "Kleisli, is that you ?"
val kleisli: Kleisli[IO, String, Unit] = Kleisli { (context: String) =>
IO(println(s"printing context: $context"))
}
val io: IO[Unit] = kleisli.run(context)
io.unsafeRunSync()
//"printing context: Kleisli, is that you?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment