The Algebra of Algebraic Data Types, Part 1

Chris Taylor:

In this series of posts I’ll explain why Haskell’s data types are called algebraic- without mentioning category theory or advanced math.
The algebra you learned in high school starts with numbers (e.g. 1, 2, 3 …) and operators (e.g. addition and multiplication). The operators give you a way to combine numbers and make new numbers from them. For example, combining 1 and 2 with the operation of addition gives you another number, 3 – a fact that we normally express as
1+2=3
When you get a little older you are introduced to variables (e.g. x, y, z …) which can stand for numbers. Further still, and you learn about the laws that algebra obeys.