This library provides an implementation of the state monad.
Author: Jan-Hendrik Matthes, Bjoern Peemoeller, Fabian Skrlac
Version: August 2016
bindS
:: (a -> (b,a)) -> (b -> a -> (c,a)) -> a -> (c,a)
|
bindS_
:: (a -> (b,a)) -> (a -> (c,a)) -> a -> (c,a)
|
returnS
:: a -> b -> (a,b)
|
getS
:: a -> (a,a)
|
putS
:: a -> a -> ((),a)
|
modifyS
:: (a -> a) -> a -> ((),a)
|
sequenceS
:: [a -> (b,a)] -> a -> ([b],a)
|
sequenceS_
:: [a -> (b,a)] -> a -> ((),a)
|
mapS
:: (a -> b -> (c,b)) -> [a] -> b -> ([c],b)
|
mapS_
:: (a -> b -> (c,b)) -> [a] -> b -> ((),b)
|
runState
:: (a -> (b,a)) -> a -> (b,a)
|
evalState
:: (a -> (b,a)) -> a -> b
|
execState
:: (a -> (b,a)) -> a -> a
|
liftS
:: (a -> b) -> (c -> (a,c)) -> c -> (b,c)
|
liftS2
:: (a -> b -> c) -> (d -> (a,d)) -> (d -> (b,d)) -> d -> (c,d)
|
Type synonym: State a b = a -> (b,a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|