From ef761491127ad7bdf502e561a43c026834d646c7 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 13 May 2024 19:01:08 -0700 Subject: [PATCH] Update 'newtype' article to new math delimiters Signed-off-by: Danila Fedorin --- content/blog/haskell_newtype.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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