trait
StateRecurse[M[_], A, B] extends AnyRef
Type Members
-
abstract
type
S
Abstract Value Members
-
abstract
def
applicative[X, T[_]](xs: T[M[X]], s: S)(implicit arg0: Traverse[T]): Either[(T[X], S), (M[T[X]], S)]
-
abstract
def
apply[X](x: M[X], s: S): (X, S)
-
abstract
def
finalize(a: A, s: S): B
-
abstract
val
init: S
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Helper trait for computations which might produce several M[X] in a stack of effects and which need to keep some state around
This is typically the case for Writer or State which need to keep some state S after each evaluation Evaluating the effect M[X] might use the previous S value as shown in the
apply method
Finally when the Eff[R, A] returns an A, this one can be combined with the last state value to produce a B