IndexedReaderWriterStateT

sealed abstract
class IndexedReaderWriterStateT[R, W, S1, S2, F[_], A]

A monad transformer stack yielding (R, S1) => F[(W, A, S2)].

Companion
object
class Object
trait Matchable
class Any
IndexedReaderWriterStateT[R, W, S1, S2, F, A]

Value members

Abstract methods

def getF[S <: S1, RR <: R]: Monad[F] => F[(RR, S) => F[(W, A, S2)]]

Concrete methods

def eval(r: R, s: S1)(implicit F: Monad[F]): F[(W, A)]

Run, discard the final state, and return the final value in the context of F

Run, discard the final state, and return the final value in the context of F

def evalZero[S <: S1](r: R)(implicit F: Monad[F], S: Monoid[S]): F[(W, A)]

Calls eval using Monoid[S].zero as the initial state

Calls eval using Monoid[S].zero as the initial state

def exec(r: R, s: S1)(implicit F: Monad[F]): F[(W, S2)]

Run, discard the final value, and return the final state in the context of F

Run, discard the final value, and return the final state in the context of F

def execZero[S <: S1](r: R)(implicit F: Monad[F], S: Monoid[S]): F[(W, S2)]

Calls exec using Monoid[S].zero as the initial state

Calls exec using Monoid[S].zero as the initial state

def flatMap[B, RR <: R, S3](f: A => IndexedReaderWriterStateT[RR, W, S2, S3, F, B])(implicit F: Bind[F], W: Semigroup[W]): IndexedReaderWriterStateT[RR, W, S1, S3, F, B]
def map[B](f: A => B)(implicit F: Functor[F]): IndexedReaderWriterStateT[R, W, S1, S2, F, B]
def mapT[G[_], B, WU, S2U](f: F[(W, A, S2)] => G[(WU, B, S2U)])(implicit F: Monad[F]): IndexedReaderWriterStateT[R, WU, S1, S2U, G, B]
def run(r: R, s: S1)(implicit F: Monad[F]): F[(W, A, S2)]
def runZero[S <: S1](r: R)(implicit F: Monad[F], S: Monoid[S]): F[(W, A, S2)]

Calls run using Monoid[S].zero as the initial state

Calls run using Monoid[S].zero as the initial state

def state(r: R)(implicit F: Monad[F]): IndexedStateT[S1, S2, F, A]

Discards the writer component.

Discards the writer component.