Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
execStateT :: Monad m => StateT s m a -> s -> m sdunai Control.Monad.Trans.MSF.State Evaluate a state computation with the given initial state and return the final state, discarding the final value.
execStateT m s = liftM snd (runStateT m s)
mapState :: ((a, s) -> (b, s)) -> State s a -> State s bdunai Control.Monad.Trans.MSF.State Map both the return value and final state of a computation using the given function.
mapStateT :: (m (a, s) -> n (b, s)) -> StateT s m a -> StateT s n bdunai Control.Monad.Trans.MSF.State Map both the return value and final state of a computation using the given function.
runState :: State s a -> s -> (a, s)dunai Control.Monad.Trans.MSF.State Unwrap a state monad computation as a function. (The inverse of state.)
-
dunai Control.Monad.Trans.MSF.State Build an MSF that takes a state as an extra input from one on the State monad. This is the opposite of stateS.
-
dunai Control.Monad.Trans.MSF.State Build an MSF function that takes a fixed state as additional input, from an MSF in the State monad, and outputs the new state with every transformation step.
-
dunai Control.Monad.Trans.MSF.State Build an MSF function that takes a fixed state as additional input, from an MSF in the State monad.
runStateT :: StateT s (m :: Type -> Type) a -> s -> m (a, s)dunai Control.Monad.Trans.MSF.State No documentation available.
withState :: (s -> s) -> State s a -> State s adunai Control.Monad.Trans.MSF.State withState f m executes action m on a state modified by applying f.
withStateT :: forall s (m :: Type -> Type) a . (s -> s) -> StateT s m a -> StateT s m adunai Control.Monad.Trans.MSF.State withStateT f m executes action m on a state modified by applying f.
withStateT f m = modify f >> m