semigroups 0.7.0 → 0.7.1
raw patch · 2 files changed
+6/−1 lines, 2 files
Files
- Data/Semigroup.hs +5/−0
- semigroups.cabal +1/−1
Data/Semigroup.hs view
@@ -29,6 +29,7 @@ , option -- * Difference lists of a semigroup , diff+ , cycle1 ) where import Prelude hiding (foldr1)@@ -76,6 +77,10 @@ | otherwise = g (x <> x) (unsafePred y `quot` 2) (x <> z) {-# INLINE replicate1p #-} +-- | A generalization of 'Data.List.cycle' to an arbitrary 'Semigroup'.+-- May fail to terminate for some values in some semigroups.+cycle1 :: Semigroup m => m -> m+cycle1 xs = xs' where xs' = xs <> xs' instance Semigroup () where _ <> _ = ()
semigroups.cabal view
@@ -1,6 +1,6 @@ name: semigroups category: Algebra, Data, Data Structures, Math-version: 0.7.0+version: 0.7.1 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE