Coyoneda

sealed abstract
class Coyoneda[F[_], A]

The dual view of the Yoneda lemma. Also a free functor on F. This is isomorphic to F as long as F itself is a functor. The homomorphism from F[A] to Coyoneda[F,A] exists even when F is not a functor.

Companion
object
class Object
trait Matchable
class Any
Coyoneda[F, A]

Type members

Types

type I

The pivot between fi and k, usually existential.

The pivot between fi and k, usually existential.

Value members

Concrete methods

def extend[G[_]](f: NaturalTransformation[[_] =>> Coyoneda[F, _$6], G]): Coyoneda[G, A]

Coyoneda is a comonad in an endofunctor category

Coyoneda is a comonad in an endofunctor category

def flatMap[G[_]](f: NaturalTransformation[F, [_] =>> Coyoneda[G, _$4]]): Coyoneda[G, A]

Coyoneda is a monad in an endofunctor category

Coyoneda is a monad in an endofunctor category

final
def map[B](f: A => B): Aux[F, B, I]

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

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

final
def run(implicit F: Functor[F]): F[A]

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

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

def toLan: Lan[Id, F, A]

Coyoneda[F,_] is the left Kan extension of F along Id

Coyoneda[F,_] is the left Kan extension of F along Id

final
def toYoneda(implicit F: Functor[F]): Yoneda[F, A]

Converts to Yoneda[F,A] given that F is a functor

Converts to Yoneda[F,A] given that F is a functor

final
def trans[G[_]](f: NaturalTransformation[F, G]): Aux[G, A, I]
@inline
final
def unlift(implicit F: Functor[F]): F[A]

Alias for run.

Alias for run.

Abstract fields

val fi: F[I]

The underlying value.

The underlying value.

val k: I => A

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

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