A Reducer[C,M] is a scalaz.Monoid[M] that maps
values of type C through unit to values of type M. A C-Reducer may also
supply operations which tack on another C to an existing MonoidM on the left
or right. These specialized reductions may be more efficient in some scenarios
and are used when appropriate by a scalaz.Generator. The names cons and snoc work
by analogy to the synonymous operations in the list monoid.
A
Reducer[C,M]
is a scalaz.Monoid[M]
that maps values of typeC
throughunit
to values of typeM
. AC-Reducer
may also supply operations which tack on anotherC
to an existingMonoid
M
on the left or right. These specialized reductions may be more efficient in some scenarios and are used when appropriate by a scalaz.Generator. The namescons
andsnoc
work by analogy to the synonymous operations in the list monoid.Minimal definition:
unit
orsnoc
Based on a Haskell library by Edward Kmett