object FoldM
Typeclass instances and creation methods for folds
- Alphabetic
- By Inheritance
- FoldM
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
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
-
implicit
def
FoldComonad[T]: Comonad[[A]FoldM[T, [X]X, A]]
Comonad instance for Fold
-
implicit
def
FoldMApply[T, M[_]](implicit arg0: Apply[M]): Apply[[A]FoldM[T, M, A]]
Apply instance
Apply instance
This means that we can write:
val mean: Fold[Int, Int] = (sum |@| count)(_ / _)
An Apply instance is also a Functor instance so we can write:
val meanTimes2 = mean.map(_ * 2)
-
def
FoldMCategory[M[_]](implicit arg0: MonadPlus[M]): Category[[A, B]FoldM[A, M, B]]
A FoldM can be turned into a Category if M has a MonadPlus instance
-
def
FoldMCobind[T, M[_]](implicit arg0: Monad[M]): Cobind[[A]FoldM[T, M, A]]
Cobind instance
-
implicit
def
FoldMCompose[M[_]](implicit arg0: Monad[M]): Compose[[A, B]FoldM[A, M, B]]
A FoldM can be turned into a Compose if M has a Monad instance
A FoldM can be turned into a Compose if M has a Monad instance
This allows us to write:
val scans = sum compose list
-
implicit
def
FoldMProfunctor[M[_]](implicit arg0: Functor[M]): Profunctor[[A, B]FoldM[A, M, B]]
Profunctor instance
Profunctor instance
This is especially useful because we can "map" on the input element
val doubleSum = fromMonoid[Double] // sum all elements val roundedDoubleSum = doubleSum.mapfst(_.round)
-
implicit
val
IdIONaturalTransformation: ~>[scalaz.Id.Id, IO]
Natural transformation from Id to IO
-
implicit
val
ListIteratorNaturalTransformation: ~>[List, Iterator]
Natural transformation from a List to an Iterator
-
implicit
def
SinkMMonoid[T, M[_]](implicit arg0: Monad[M]): Monoid[SinkM[T, M]]
monoid to append sinks effects
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromFoldLeft[T, U](u: U)(f: (U, T) ⇒ U): Fold[T, U] { type S = U }
- returns
a fold from arguments of a fold left
-
def
fromMonoid[M](implicit arg0: Monoid[M]): Fold[M, M] { type S = M }
- returns
a fold from a Monoid
-
def
fromMonoidMap[T, M](f: (T) ⇒ M)(implicit arg0: Monoid[M]): Fold[T, M] { type S = M }
- returns
a fold which uses a Monoid to accumulate elements
-
def
fromReducer[T, S](reducer: Reducer[T, S]): Fold[T, S] { type S = S }
- returns
a fold from a Reducer
-
def
fromStart[T, M[_], S1](action: M[S1])(implicit arg0: Monad[M]): FoldM[T, M, S1] { type S = S1 }
- returns
a fold with just a start action
-
def
fromStateEval[T, M[_], U, V](state: (T) ⇒ State[U, V])(init: U)(implicit arg0: Monad[M]): FoldM[T, M, Option[V]] { type S = (U, Option[V]) }
- returns
a fold for the evaluation of a State object
-
def
fromStateExec[T, M[_], U, V](state: (T) ⇒ State[U, V])(init: U)(implicit arg0: Monad[M]): FoldM[T, M, U] { type S = (U, Option[V]) }
- returns
a fold for the execution of a State object
-
def
fromStateRun[T, M[_], U, V](state: (T) ⇒ State[U, V])(init: U)(implicit arg0: Monad[M]): FoldM[T, M, (U, Option[V])] { ... /* 2 definitions in type refinement */ }
- returns
a fold from running a State object
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
idM[M[_], A](implicit arg0: MonadPlus[M]): FoldM[A, M, A] { type S = M[A] }
identity fold for a MonadPlus monad
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unitSink[T, M[_]](implicit arg0: Monad[M]): FoldM[T, M, Unit] { type S = Unit }
sink doing nothing
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )