Lesson 262
Category Theory
Objects · Morphisms · Functors
1:00The mathematics of composition — objects, morphisms, the two category laws, functors, and how it all maps onto types and functions in code.
By the end, you can
- Define a category and name its four components.
- State both category axioms (identity and associativity) and explain what each guarantees.
- Evaluate a composition expression by applying the right-to-left rule.
- Identify which pairs of morphisms can be composed given their domains and codomains.
- Describe the Hask category and map each categorical concept to its programming counterpart.
- Give examples of morphisms that are not functions (poset relations, monoid elements).
- Explain what a functor is and verify that a given map satisfies the two functor laws.
- Predict the result of mapping a function over a list, a non-empty optional, and an empty optional.
Up next in Advanced Algorithms, Math & PL Theory




