Commit 4d85d68b authored by Paavo Parkkinen's avatar Paavo Parkkinen Committed by Marge Bot

Clean up

parent 5b632dad
......@@ -126,7 +126,6 @@ cycle1 xs = xs' where xs' = xs <> xs'
-- | This lets you use a difference list of a 'Semigroup' as a 'Monoid'.
--
-- >>> import Data.Semigroup
-- >>> let hello = diff "Hello, "
-- >>> appEndo hello "World!"
-- "Hello, World!"
......@@ -136,9 +135,9 @@ cycle1 xs = xs' where xs' = xs <> xs'
-- "Hello, World!"
-- >>> let world = diff "World"
-- >>> let excl = diff "!"
-- >>> print $ appEndo (hello <> (world <> excl)) mempty
-- >>> appEndo (hello <> (world <> excl)) mempty
-- "Hello, World!"
-- >>> print $ appEndo ((hello <> world) <> excl) mempty
-- >>> appEndo ((hello <> world) <> excl) mempty
-- "Hello, World!"
diff :: Semigroup m => m -> Endo m
diff = Endo . (<>)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment