Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

- postMutate_ :: MonadMutate m v => v a -> (a -> a) -> m a
- preMutate_ :: MonadMutate m v => v a -> (a -> a) -> m a
- postMutate :: MonadMutate m v => v a -> (a -> (a, b)) -> m (a, b)
- preMutate :: MonadMutate m v => v a -> (a -> (a, b)) -> m (a, b)
- postMutateM_ :: (MonadMutateM f m v, Functor f) => v a -> (a -> f a) -> m a
- preMutateM_ :: (MonadMutateM f m v, Functor f) => v a -> (a -> f a) -> m a
- postMutateM :: (MonadMutateM f m v, Functor f) => v a -> (a -> f (a, b)) -> m (a, b)
- preMutateM :: (MonadMutateM f m v, Functor f) => v a -> (a -> f (a, b)) -> m (a, b)

# Documentation

postMutate_ :: MonadMutate m v => v a -> (a -> a) -> m a Source #

Mutate a variable and also return its old value.

preMutate_ :: MonadMutate m v => v a -> (a -> a) -> m a Source #

Mutate a variable and also return its new value.

postMutate :: MonadMutate m v => v a -> (a -> (a, b)) -> m (a, b) Source #

Mutate a variable and also return its old value along with an additional value.

preMutate :: MonadMutate m v => v a -> (a -> (a, b)) -> m (a, b) Source #

Mutate a variable and also return its new value along with an additional value.

postMutateM_ :: (MonadMutateM f m v, Functor f) => v a -> (a -> f a) -> m a Source #

Monadically mutate a variable and also return its old value.

preMutateM_ :: (MonadMutateM f m v, Functor f) => v a -> (a -> f a) -> m a Source #

Monadically mutate a variable and also return its new value.

postMutateM :: (MonadMutateM f m v, Functor f) => v a -> (a -> f (a, b)) -> m (a, b) Source #

Monadically mutate a variable and also return its old value along with an additional value.

preMutateM :: (MonadMutateM f m v, Functor f) => v a -> (a -> f (a, b)) -> m (a, b) Source #

Monadically mutate a variable and also return its new value along with an additional value.