Representable Functors
Prev: Free Monoids Next: The Yoneda Lemma
Prev: Free Monoids Next: The Yoneda Lemma
Exercises
- Show that the hom-functors map identity morphisms in to corresponding identity functions in .
- Show that
Maybeis not representable. - Is the
Readerfunctor representable? - Using
Streamrepresentation, memoize a function that squares its argument. - Show that
tabulateandindexforStreamare indeed the inverse of each other. (Hint: use induction.) - The functor:
Pair a = Pair a ais representable. Can you guess the type that represents it? Implement tabulate and index.