abstract class Yoneda[F[_], A] extends AnyRef
The cofree functor generated by F
. The Yoneda lemma says that
Yoneda[F,A]
is isomorphic to F[A]
for any functor F
.
The homomorphism from Yoneda[F,A]
to F[A]
exists even when
we have forgotten that F
is a functor.
Can be seen as a partially applied map
for the functor F
.
- Self Type
- Yoneda[F, A]
- Source
- Yoneda.scala
- Alphabetic
- By Inheritance
- Yoneda
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Yoneda()
Abstract Value Members
- abstract def apply[B](f: (A) ⇒ B): F[B]
Concrete 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.CloneNotSupportedException])
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def extend[G[_]](f: ~>[[β$0$]Yoneda[F, β$0$], G])(implicit arg0: Functor[G]): Yoneda[G, A]
Yoneda
is a comonad in an endofunctor category - def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[G[_]](f: ~>[F, [β$1$]Yoneda[G, β$1$]]): Yoneda[G, A]
Yoneda
is a monad in an endofunctor category - final def getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (A) ⇒ B): Yoneda[F, B]
Simple function composition.
Simple function composition. Allows map fusion without traversing an
F
. - 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()
- def run: F[A]
Converts to
F[A]
even without aFunctor
instance forF
- final def synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toCoyoneda: Aux[F, A, A]
Converts to
Coyoneda[F,A]
even without aFunctor
instance forF
- def toRan: Ran[Id.Id, F, A]
Yoneda[F, _]
is the right Kan extension ofF
alongId
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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
- @native() @throws(classOf[java.lang.InterruptedException])