diff --git a/content/blog/haskell_newtype.md b/content/blog/haskell_newtype.md index 0bb4a1b..709403e 100644 --- a/content/blog/haskell_newtype.md +++ b/content/blog/haskell_newtype.md @@ -40,7 +40,7 @@ starting with integers. #### Integers Addition is an associative binary operation. Furthermore, it's well-known that adding zero to a -number leaves that number intact: \\(0+n = n + 0 = n\\). So we might define a `Monoid` instance for +number leaves that number intact: \(0+n = n + 0 = n\). So we might define a `Monoid` instance for numbers as follows. Note that we actually provide `(<>)` via the `Semigroup` class, which _just_ requires the associative binary operation, and serves as a superclass for `Monoid`. @@ -54,7 +54,7 @@ instance Monoid Int where Cool and good. But hey, there are other binary operations on integers! What about multiplication? It is also associative, and again it is well-known that multiplying -anything by one leaves that number as it was: \\(1\*n = n\*1 = n\\). The corresponding +anything by one leaves that number as it was: \(1\*n = n\*1 = n\). The corresponding `Monoid` instance would be something like the following: ```Haskell