[commit: ghc] master: base: NonEmpty: Fix documentation example (758e6b3)
git at git.haskell.org
git at git.haskell.org
Tue Dec 15 20:50:31 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/758e6b3a935242acacfa5f1c23ecd1b0e9310e28/ghc
>---------------------------------------------------------------
commit 758e6b3a935242acacfa5f1c23ecd1b0e9310e28
Author: Ben Gamari <ben at smart-cactus.org>
Date: Tue Dec 15 21:50:36 2015 +0100
base: NonEmpty: Fix documentation example
Fixes #11178.
>---------------------------------------------------------------
758e6b3a935242acacfa5f1c23ecd1b0e9310e28
libraries/base/Data/List/NonEmpty.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libraries/base/Data/List/NonEmpty.hs b/libraries/base/Data/List/NonEmpty.hs
index a66ea8f..1553836 100644
--- a/libraries/base/Data/List/NonEmpty.hs
+++ b/libraries/base/Data/List/NonEmpty.hs
@@ -313,7 +313,7 @@ iterate f a = a :| List.iterate f (f a)
-- | @'cycle' xs@ returns the infinite repetition of @xs@:
--
--- > cycle [1,2,3] = 1 :| [2,3,1,2,3,...]
+-- > cycle (1 :| [2,3]) = 1 :| [2,3,1,2,3,...]
cycle :: NonEmpty a -> NonEmpty a
cycle = fromList . List.cycle . toList
More information about the ghc-commits
mailing list