reducers-3.12.1: Semigroups, specialized containers and a general map/reduce framework

Copyright | (c) Edward Kmett 2009
License | BSD-style
Maintainer | ekmett@gmail.com
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell98

Data.Semigroup.Self

Description

A simple `Monoid` transformer that takes a `Monoid` m and produces a new `m`-Reducer named `Self` `m`

This is useful when you have a generator that already contains monoidal values or someone supplies the map to the monoid in the form of a function rather than as a Reducer instance. You can just ``getSelf` . `reduce`` or ``getSelf` . `mapReduce` f` in those scenarios. These behaviors are encapsulated into the `fold` and `foldMap` combinators in Data.Monoid.Combinators respectively.

# Documentation

newtype Self m Source

Constructors

Self |

Fields

getSelf :: m

Instances

Functor Self Source |
Foldable Self Source |
Traversable Self Source |
Traversable1 Self Source |
Foldable1 Self Source |
Semigroup m => Reducer m (Self m) Source |
Monoid m => Monoid (Self m) Source |
Semigroup m => Semigroup (Self m) Source |