Access helper functions in a State monad

- set :: MonadState r m => T r a -> a -> m ()
- get :: MonadState r m => T r a -> m a
- modify :: MonadState r m => T r a -> (a -> a) -> m ()
- getAndModify :: MonadState r m => T r a -> (a -> a) -> m a
- modifyAndGet :: MonadState r m => T r a -> (a -> a) -> m a
- (%=) :: MonadState r m => T r a -> a -> m ()
- (%:) :: MonadState r m => T r a -> (a -> a) -> m ()

# Documentation

set :: MonadState r m => T r a -> a -> m ()Source

get :: MonadState r m => T r a -> m aSource

modify :: MonadState r m => T r a -> (a -> a) -> m ()Source

getAndModify :: MonadState r m => T r a -> (a -> a) -> m aSource

Modify a record element and return its old value.

modifyAndGet :: MonadState r m => T r a -> (a -> a) -> m aSource

Modify a record element and return its new value.