Skip to main content
Post Made Community Wiki
Source Link
Dan Piponi
  • 8.3k
  • 5
  • 64
  • 92

I always think it's best to have examples to work with. The examples I was first exposed to were in algebraic topology, but I think there's an enormous store of examples in the world of elementary functional programming.

Objects, morphisms, (endo)functors, natural transformations, products, coproducts, limits of functors, colimits of functors, monads, ends, coends, representable functors and so on all have not-quite-trivial but natural interpretations as programming constructs. These examples don't require a vast programming knowledge to understand.

The important point is to bear in mind that these are just specific examples and that the categorical definitions are, of course, more general. But often proofs written about functional programs generalise correctly to proofs in general category theory with minimal change (because various fragments of various programming languages are in fact internal languages for various types of category).