Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package p
import cats.Functor
case class Const[A, R](value: A)
object Const {
implicit def constFunctor[X]: Functor[Const[X, ?]] =
new Functor[Const[X, ?]] {
override def map[A, B](fa: Const[X, A])(f: A => B): Const[X, B] = Const(fa.value)
}
}
case class Toto[A](y: String) // Const[String, A]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.