final class ReducerOps[A] extends AnyVal
- Source
- ReducerOps.scala
- Alphabetic
- By Inheritance
- ReducerOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ReducerOps(self: A)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cons[M](m: M)(implicit r: Reducer[A, M]): M
Prepend the value to a monoid for use in right-to-left reduction
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
snoc[C](c: C)(implicit r: Reducer[C, A]): A
Append the value to a monoid for use in left-to-right reduction
-
def
toString(): String
- Definition Classes
- Any
-
def
unfoldl[C](f: (A) ⇒ Maybe[(A, C)]): UnfoldTo[C]
Unfold to the left using this value as initial seed.
Unfold to the left using this value as initial seed.
Example:
0.unfoldl(i => if (i < 5) just((i+1, i.toString)) else empty[(Int, String)]).to[List] = List(4, 3, 2, 1, 0)
-
def
unfoldr[C](f: (A) ⇒ Maybe[(C, A)]): UnfoldTo[C]
Unfold to the right using this value as initial seed Example:
Unfold to the right using this value as initial seed Example:
0.unfoldr(i => if (i < 5) just((i.toString, i+1)) else empty[(String, Int)]).to[List] = List(0, 1, 2, 3, 4)
-
def
unit[M](implicit r: Reducer[A, M]): M
Convert the value into a monoid