Skip to content

Commit f13f69b

Browse files
committed
plurals
1 parent 6a5f3b1 commit f13f69b

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

source_md/for-a-few-monads-more.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ fromDiffList (DiffList f) = f []
529529
To make a normal list into a difference list we just do what we did before and make it a function that prepends it to another list.
530530
Because a difference list is a function that prepends something to another list, if we just want that something, we apply the function to an empty list!
531531

532-
Here's the `Monoid` instance:
532+
Here are the `Semigroup` and `Monoid` instances:
533533

534534
```{.haskell:hs}
535535
instance Semigroup (DiffList a) where

source_md/functors-applicative-functors-and-monoids.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ Haskell doesn't enforce these laws, so we as the programmer have to be careful t
15491549

15501550
Yes, lists are monoids!
15511551
Like we've seen, the `++` function and the empty list `[]` form a monoid.
1552-
The instance is very simple:
1552+
The instances are very simple:
15531553

15541554
```{.haskell:hs}
15551555
instance Semigroup [a] where
@@ -1640,7 +1640,7 @@ newtype Product a = Product { getProduct :: a }
16401640
```
16411641

16421642
Simple, just a `newtype` wrapper with one type parameter along with some derived instances.
1643-
Its instance for `Monoid` goes a little something like this:
1643+
Its instances for `Semigroup` and `Monoid` go a little something like this:
16441644

16451645
```{.haskell:hs}
16461646
instance Num a => Semigroup (Product a) where
@@ -1696,7 +1696,7 @@ newtype Any = Any { getAny :: Bool }
16961696
deriving (Eq, Ord, Read, Show, Bounded)
16971697
```
16981698

1699-
Its instance looks goes like so:
1699+
Its instances look like so:
17001700

17011701
```{.haskell:hs}
17021702
instance Semigroup Any where
@@ -1729,7 +1729,7 @@ newtype All = All { getAll :: Bool }
17291729
deriving (Eq, Ord, Read, Show, Bounded)
17301730
```
17311731

1732-
And this is the instance:
1732+
And these are the instances:
17331733

17341734
```{.haskell:hs}
17351735
instance Semigroup All where
@@ -1876,7 +1876,7 @@ Let's take a look at the various ways that `Maybe a` can be made an instance of
18761876

18771877
One way is to treat `Maybe a` as a monoid only if its type parameter `a` is a semigroup (or even a monoid) and then implement `<>` in such a way that it uses the `<>` operation of the values that are wrapped with `Just`.
18781878
We use `Nothing` as the identity, and so if one of the two values that we're `<>`ing is `Nothing`, we keep the other value.
1879-
Here's the instance declaration:
1879+
Here are the instance declarations:
18801880

18811881
```{.haskell:hs}
18821882
instance Semigroup a => Semigroup (Maybe a) where
@@ -1918,7 +1918,7 @@ newtype First a = First { getFirst :: Maybe a }
19181918
```
19191919

19201920
We take a `Maybe a` and we wrap it with a `newtype`.
1921-
The `Monoid` instance is as follows:
1921+
The `Semigroup` and `Monoid` instances are as follows:
19221922

19231923
```{.haskell:hs}
19241924
instance Semigroup (First a) where

0 commit comments

Comments
 (0)