Yoneda is a comonad in an endofunctor category
Yoneda is a monad in an endofunctor category
Simple function composition.
Simple function composition. Allows map fusion without traversing an F.
Converts to F[A] even without a Functor instance for F
Converts to Coyoneda[F,A] even without a Functor instance for F
Yoneda[F, _] is the right Kan extension of F along Id
The cofree functor generated by
F. The Yoneda lemma says thatYoneda[F,A]is isomorphic toF[A]for any functorF. The homomorphism fromYoneda[F,A]toF[A]exists even when we have forgotten thatFis a functor. Can be seen as a partially appliedmapfor the functorF.