School Information System
Newsletter Sign Up |

Subscribe to this site via RSS: | Newsletter signup | Send us your ideas

June 4, 2013

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.

Posted by Jim Zellmer at June 4, 2013 12:35 AM
Subscribe to this site via RSS/Atom: Newsletter signup | Send us your ideas
Comments
Post a comment









Remember personal info?