ContravariantCoyoneda

cats.free.ContravariantCoyoneda
See theContravariantCoyoneda companion object
sealed abstract class ContravariantCoyoneda[F[_], A] extends Serializable

The free contravariant functor on F. This is isomorphic to F as long as F itself is a contravariant functor. The function from F[A] to ContravariantCoyoneda[F,A] exists even when F is not a contravariant functor. Implemented using a List of functions for stack-safety.

Attributes

Companion
object
Source
ContravariantCoyoneda.scala
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type

Members list

Type members

Types

type Pivot

The pivot between fi and k, usually existential.

The pivot between fi and k, usually existential.

Attributes

Source
ContravariantCoyoneda.scala

Value members

Abstract methods

def k: A => Pivot

The composed transformer function, to be lifted into F by run.

The composed transformer function, to be lifted into F by run.

Attributes

Source
ContravariantCoyoneda.scala

Concrete methods

final def contramap[B](f: B => A): Aux[F, B, Pivot]

Simple function composition.

Simple function composition. Allows contramap fusion without touching the underlying F.

Attributes

Source
ContravariantCoyoneda.scala
final def foldMap[G[_]](trans: FunctionK[F, G])(implicit G: Contravariant[G]): G[A]

Converts to G[A] given that G is a contravariant functor

Converts to G[A] given that G is a contravariant functor

Attributes

Source
ContravariantCoyoneda.scala
final def mapK[G[_]](f: FunctionK[F, G]): Aux[G, A, Pivot]

Modify the context F using transformation f.

Modify the context F using transformation f.

Attributes

Source
ContravariantCoyoneda.scala
final def run(implicit F: Contravariant[F]): F[A]

Converts to F[A] given that F is a contravariant functor

Converts to F[A] given that F is a contravariant functor

Attributes

Source
ContravariantCoyoneda.scala

Abstract fields

val fi: F[Pivot]

The underlying value.

The underlying value.

Attributes

Source
ContravariantCoyoneda.scala