Representable Functors

Prev: Free Monoids Next: The Yoneda Lemma

Prev: Free Monoids Next: The Yoneda Lemma

Exercises

  1. Show that the hom-functors map identity morphisms in to corresponding identity functions in .
  2. Show that Maybe is not representable.
  3. Is the Reader functor representable?
  4. Using Stream representation, memoize a function that squares its argument.
  5. Show that tabulate and index for Stream are indeed the inverse of each other. (Hint: use induction.)
  6. The functor:
Pair a = Pair a a

is representable. Can you guess the type that represents it? Implement tabulate and index.