Category theory for beginners
category-theoryfunctional-programmingtype-theorymathematics
Abstraction: Category theory concepts mapped to functional programming abstractions
Key points:
- Category theory (invented 1940s by Eilenberg and Mac Lane) provides composability primitives directly applicable to programming
- A category consists of objects, arrows (morphisms), composition, and identity; examples include class hierarchies, posets, and the category of types and functions
- Functors map between categories preserving structure; monads were discovered by Godement in 1958 and applied to programming by Moggi and Wadler in 1990
- Monoids, algebraic data types, and functors are the core abstractions enabling composable software design in functional languages
- Applicative functors introduced in 2006 "Applicative Programming with Effects" (McBride & Paterson)
- Mathematical laws (associativity, identity) enforce correctness of compositions; Haskell's type system enforces many of these laws
Connections: Haskell · Category Theory · Functional Programming · Type Theory
Source: http://www.slideshare.net/kenbot/category-theory-for-beginners