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

Language | Haskell98 |

Utility functions for Kleisli arrows

- foreverK :: Monad m => (a -> m a) -> a -> m b
- replicateK :: Monad m => Int -> (a -> m a) -> a -> m a
- liftK :: (Monad m, MonadTrans t) => (a -> m b) -> a -> t m b

# Core utility functions

replicateK :: Monad m => Int -> (a -> m a) -> a -> m a Source #

Repeat a '`K`

'leisli arrow multiple times

liftK :: (Monad m, MonadTrans t) => (a -> m b) -> a -> t m b Source #

Convenience function equivalent to `(lift .)`

liftK f >=> liftK g = liftK (f >=> g) liftK return = return