Density

trait Density[F[_], Y]

Density Comonad.

Density is Left Kan Extension where both Functors are the same.

Without any restrictions on F we can define Functor, Cobind, Comonad for Density[F]. Density is Comonad for free.

See also
Companion
object
class Object
trait Matchable
class Any
Density[F, Y]

Type members

Classlikes

Types

type X

Value members

Abstract methods

def f: F[X] => Y

Concrete methods

def densityToAdjunction[X[_]](implicit F: Functor[F], A: Adjunction[F, X]): F[X[Y]]
def densityToLan: Lan[F, F, Y]

Density is left Kan extension of a Functor F along itself (Lan f f).

Density is left Kan extension of a Functor F along itself (Lan f f).

lanToDensity(d.densityToLan) == d lanToDensity(l).densityToLan == l

def lowerDensity(implicit C: Cobind[F]): F[Y]

The natural isomorphism between a Comonad F and the Density F.

The natural isomorphism between a Comonad F and the Density F.

d.lowerDensity andThen liftDensity = d

def map[A](fab: Y => A): Density[F, A]
def runDensity: Y

Abstract fields

val fb: F[X]