abstract class Adjunction[F[_], G[_]] extends AnyRef
An adjunction formed by two functors F
and G
such that F
is left-adjoint to G
.
The composite functor GF is a monad and the composite functor FG is a comonad.
The minimal definition is either (unit, counit) or (leftAdjunct, rightAdjunct)
- Self Type
- Adjunction[F, G]
- Source
- Adjunction.scala
- Alphabetic
- By Inheritance
- Adjunction
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val F: Functor[F]
- implicit val G: Functor[G]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- implicit val comonad: Comonad[[α]F[G[α]]]
Every adjunction gives rise to a comonad.
- def compose[P[_], Q[_]](implicit A: -|[P, Q]): -|[[α]P[F[α]], [α]G[Q[α]]]
Adjunctions compose in a natural fashion.
Adjunctions compose in a natural fashion. If
F -| G
is an adjunction, andP -| Q
is an adjunction, then PF -| GQ is an adjunction. In fact, adjunctions in Scala form a monoid. - def counit[A](a: F[G[A]]): A
Extracts a value out of the comonad.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def leftAdjunct[A, B](a: => A)(f: (F[A]) => B): G[B]
Every
F
-algebra maps to aG
-coalgebra. - implicit val monad: Monad[[α]G[F[α]]]
Every adjunction gives rise to a monad.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val representable: Representable[G, F[Unit]]
Every adjunction is representable.
- def rightAdjunct[A, B](a: F[A])(f: (A) => G[B]): B
Every
G
-coalgebra maps to anF
-algebra. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unit[A](a: => A): G[F[A]]
Puts a value into the monad.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- implicit val zapFG: Zap[F, G]
Adjoint functors annihilate each other.
- implicit val zapGF: Zap[G, F]
Adjoint functors annihilate each other.