arrow-mtl / arrow.mtl.typeclasses / MonadState

MonadState

interface MonadState<F, S> : Monad<F>

Functions

get abstract fun get(): Kind<F, S>
inspect open fun <A> inspect(f: (S) -> A): Kind<F, A>
modify open fun modify(f: (S) -> S): Kind<F, Unit>
set abstract fun set(s: S): Kind<F, Unit>
state open fun <A> state(f: (S) -> Tuple2<S, A>): Kind<F, A>

Inheritors

StateTMonadState interface StateTMonadState<F, S> : MonadState<StateTPartialOf<F, S>, S>, StateTMonad<F, S>

Type Class Hierarchy