From 54c3ab5b9e0f759de92cc74f718c81372829891f Mon Sep 17 00:00:00 2001 From: Emily Pillmore Date: Mon, 7 Dec 2020 16:17:24 -0500 Subject: [PATCH] fix generate' so that mempty is included in the truncated list --- src/Data/Group.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Group.hs b/src/Data/Group.hs index 3b7b9e3..6aec99e 100644 --- a/src/Data/Group.hs +++ b/src/Data/Group.hs @@ -148,7 +148,7 @@ generated' :: (Eq a, Cyclic a) => [a] generated' = unfoldr go (generator, 0 :: Integer) where go (a, n) - | a == mempty, n > 0 = Nothing + | a == generator, n > 0 = Nothing | otherwise = Just (a, (a <> generator, succ n)) instance Cyclic () where