Skip to content

Instantly share code, notes, and snippets.

Created July 13, 2017 06:33
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 anonymous/bfbd497fbff130cfa267a29e8f94e9f5 to your computer and use it in GitHub Desktop.
Save anonymous/bfbd497fbff130cfa267a29e8f94e9f5 to your computer and use it in GitHub Desktop.
the description for this gist
//natural transformation from `cats.Id` to `fs2.Task`
val idToTask = new FunctionK[Id, Task] {
override def apply[A](fa: Id[A]): Task[A] = Task(fa)(Strategy.sequential)
}
implicit val logHandler: FSHandler[Log.Op, Task] =
(new PrintlnLogger).andThen(idToTask)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment