trait Reducer[C, M] extends AnyRef
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).
- Source
- Reducer.scala
- Alphabetic
- By Inheritance
- Reducer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait ReducerLaw extends AnyRef
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def append(a1: M, a2: => M): M
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compose[N](r: Reducer[C, N]): Reducer[C, (M, N)]
Distribute
C
s toM
andN
. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def reducerLaw: ReducerLaw
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unfoldl[B](seed: B)(f: (B) => Maybe[(B, C)])(implicit M: Monoid[M]): M
- def unfoldlOpt[B](seed: B)(f: (B) => Maybe[(B, C)]): Maybe[M]
- def unfoldr[B](seed: B)(f: (B) => Maybe[(C, B)])(implicit M: Monoid[M]): M
- def unfoldrOpt[B](seed: B)(f: (B) => Maybe[(C, B)]): Maybe[M]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()