- State : Type -> Type -> Type
The State monad. See the MonadState interface
Totality: total- record StateT : Type -> (Type -> Type) -> Type -> Type
The transformer on which the State monad is based
Totality: total
Constructor: - ST : (stateType -> m (stateType, a)) -> StateT stateType m a
Projection: - .runStateT' : StateT stateType m a -> stateType -> m (stateType, a)
- evalState : stateType -> State stateType a -> a
Unwrap and apply a State monad computation, but discard the final state.
Totality: total- evalStateT : Functor m => stateType -> StateT stateType m a -> m a
Unwrap and apply a StateT monad computation, but discard the final state.
Totality: total- execState : stateType -> State stateType a -> stateType
Unwrap and apply a State monad computation, but discard the resulting value.
Totality: total- execStateT : Functor m => stateType -> StateT stateType m a -> m stateType
Unwrap and apply a StateT monad computation, but discard the resulting value.
Totality: total- mapState : ((s, a) -> (s, b)) -> State s a -> State s b
Map both the return value and final state of a computation using
the given function.
Totality: total- mapStateT : (m (s, a) -> n (s, b)) -> StateT s m a -> StateT s n b
Map both the return value and final state of a computation using
the given function.
Totality: total- runState : stateType -> State stateType a -> (stateType, a)
Unwrap and apply a State monad computation.
Totality: total- runStateT : stateType -> StateT stateType m a -> m (stateType, a)
Unwrap and apply a StateT monad computation.
Totality: total