Book Description
Category Theory is one of the most abstract branches of mathematics. It is usually taught to graduate students after they have mastered several other branches of mathematics, like algebra, topology, and group theory. It might, therefore, come as a shock that the basic concepts of category theory can be explained in relatively simple terms to anybody with some experience in programming.
That's because, just like programming, category theory is about structure. Mathematicians discover structure in mathematical theories, programmers discover structure in computer programs. Well-structured programs are easier to understand and maintain and are less likely to contain bugs. Category theory provides the language to talk about structure and learning it will make you a better programmer.
This open book is licensed under a Creative Commons License (CC BY-SA). You can download Category Theory for Programmers ebook for free in PDF format (16.3 MB).
Table of Contents
Chapter 1
Category: The Essence of Composition
Chapter 2
Types and Functions
Chapter 3
Categories Great and Small
Chapter 4
Kleisli Categories
Chapter 5
Products and Coproducts
Chapter 6
Simple Algebraic Data Types
Chapter 7
Functors
Chapter 8
Functoriality
Chapter 9
Function Types
Chapter 10
Natural Transformations
Chapter 11
Declarative Programming
Chapter 12
Limits and Colimits
Chapter 13
Free Monoids
Chapter 14
Representable Functors
Chapter 15
The Yoneda Lemma
Chapter 16
Yoneda Embedding
Chapter 17
It's All About Morphisms
Chapter 18
Adjunctions
Chapter 19
Free/Forgetful Adjunctions
Chapter 20
Monads: Programmer's Definition
Chapter 21
Monads and Effects
Chapter 22
Monads Categorically
Chapter 23
Comonads
Chapter 24
F-Algebras
Chapter 25
Algebras for Monads
Chapter 26
Ends and Coends
Chapter 27
Kan Extensions
Chapter 28
Enriched Categories
Chapter 29
Topoi
Chapter 30
Lawvere Theories
Chapter 31
Monads, Monoids, and Categories