type: MonadState s m = > m s, [1,2,3] MonadState s m? , s .
ghci> runState get [1,2,3]
runState : - State , - . , [1,2,3], (*), s [Integer].
(*) , [1,2,3] :: Num a => [a] , GHCi , [Integer] GHCi.
, , runState
runState :: State [Integer] a -> [Integer] -> (a, [Integer])
:
get :: MonadState s m => m s
m s = State s a, runState, . :
runState :: State [Integer] a -> [Integer] -> (a, [Integer])
get :: MonadState s m => m s
with m s = State [Integer] a
:
runState :: State [Integer] a -> [Integer] -> (a, [Integer])
get :: MonadState s m => m s
with m = State [Integer]
and s = a
s:
runState :: State [Integer] a -> [Integer] -> (a, [Integer])
get :: MonadState a m => m a
with m = State [Integer]
m:
runState :: State [Integer] a -> [Integer] -> (a, [Integer])
get :: MonadState a (State [Integer]) => State [Integer] a
MonadState a (State [Integer]) , a = [Integer]. , MonasState , , . , State StateT. , :
runState :: State [Integer] a -> [Integer] -> (a, [Integer])
get :: MonadState a (State [Integer]) => State [Integer] a
with a = [Integer]
,
runState :: State [Integer] [Integer] -> [Integer] -> ([Integer], [Integer])
get :: MonadState [Integer] (State [Integer]) => State [Integer] [Integer]
:
runState :: State [Integer] [Integer] -> [Integer] -> ([Integer], [Integer])
get :: State [Integer] [Integer]
.