x * 1 = x
1 * x = 1
x * (y * z) = (x * y) * z
These should be familiar if you know about integers.Now consider the following equations for strings:
concat(x, "") = x
concat("", x) = x
concat(x, concat(y, z)) = concat(concat(x, y), z)
These should be familiar if you know about strings.Now consider the following equations for booleans:
x or false = x
false or x = x
x or (y or z) = (x or y) or z
These should be familiar if you know about booleans.If you can see the pattern, you understand monoids. Monoids are everywhere in programming.