A Reducer[C,M]
is a scalaz.Semigroup[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 Semigroup
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 names cons
and snoc
work
by analogy to the synonymous operations in the list semigroup.
Minimal definition: unit
or snoc
Based on the Reducer Haskell library by Edward Kmett (https://hackage.haskell.org/package/reducers).
- Companion
- object