Skip to content

Commit e3332a6

Browse files
committed
remove unnecessary imports
1 parent 1ae3c60 commit e3332a6

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,6 @@ class Monoid m where
15041504

15051505
![woof dee do!!!](assets/images/functors-applicative-functors-and-monoids/balloondog.png){.right width=260 height=326}
15061506

1507-
The `Monoid` type class is defined in `import Data.Monoid`.
15081507
Let's take some time and get properly acquainted with it.
15091508

15101509
First of all, we see that only concrete types can be made instances of `Monoid`, because the `m` in the type class definition doesn't take any type parameters.
@@ -1812,8 +1811,6 @@ We name the result of comparing the lengths `a` and the result of the alphabetic
18121811
But by employing our understanding of how `Ordering` is a monoid, we can rewrite this function in a much simpler manner:
18131812

18141813
```{.haskell:hs}
1815-
import Data.Monoid
1816-
18171814
lengthCompare :: String -> String -> Ordering
18181815
lengthCompare x y = (length x `compare` length y) <>
18191816
(x `compare` y)
@@ -1833,8 +1830,6 @@ That's why we put the comparison that we consider to be the first, more importan
18331830
If we wanted to expand this function to also compare for the number of vowels and set this to be the second most important criterion for comparison, we'd just modify it like this:
18341831

18351832
```{.haskell:hs}
1836-
import Data.Monoid
1837-
18381833
lengthCompare :: String -> String -> Ordering
18391834
lengthCompare x y = (length x `compare` length y) <>
18401835
(vowels x `compare` vowels y) <>

0 commit comments

Comments
 (0)