monoids-0.2.0.4: Monoids, specialized containers and a general map/reduce framework

Portabilitynon-portable (type families, MPTCs)
Stabilityexperimental
Maintainerekmett@gmail.com

Data.Monoid.Combinators

Contents

Description

Utilities for working with Monoids that conflict with names from the Prelude, Data.Foldable, Control.Monad or elsewhere. Intended to be imported qualified.

 import Data.Monoid.Combinators as Monoid 

Synopsis

List-Like Monoid Production

repeat :: Reducer e m => e -> mSource

A generalization of Data.List.repeat to an arbitrary Monoid. May fail to terminate for some values in some monoids.

replicate :: (Monoid m, Integral n) => m -> n -> mSource

A generalization of Data.List.replicate to an arbitrary Monoid. Adapted from http://augustss.blogspot.com/2008/07/lost-and-found-if-i-write-108-in.html

cycle :: Monoid m => m -> mSource

A generalization of Data.List.cycle to an arbitrary Monoid. May fail to terminate for some values in some monoids.