utility-ht-0.0.10: Various small helper functions for Lists, Maybes, Tuples, Functions

Safe HaskellSafe-Inferred

Control.Monad.HT

Synopsis

Documentation

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m cSource

Also present in newer versions of the base package.

repeat :: Monad m => m a -> m [a]Source

Monadic repeat.

until :: Monad m => (a -> Bool) -> m a -> m aSource

repeat action until result fulfills condition

untilM :: Monad m => (a -> Bool) -> m a -> m aSource

Deprecated: use M.until

repeat action until result fulfills condition

iterateLimit :: Monad m => Int -> (a -> m a) -> a -> m [a]Source

parameter order equal to that of nest

iterateLimitM :: Monad m => Int -> (a -> m a) -> a -> m [a]Source

Deprecated: use M.iterateLimit

parameter order equal to that of nest

andLazy :: Monad m => m Bool -> m Bool -> m BoolSource

Lazy monadic conjunction. That is, when the first action returns False, then False is immediately returned, without running the second action.

orLazy :: Monad m => m Bool -> m Bool -> m BoolSource

Lazy monadic disjunction. That is, when the first action returns True, then True is immediately returned, without running the second action.

void :: Monad m => m a -> m ()Source

for :: Monad m => [a] -> (a -> m b) -> m [b]Source

map :: Monad m => (a -> m b) -> [a] -> m [b]Source

zipWith :: Monad m => (a -> b -> m c) -> [a] -> [b] -> m [c]Source

filter :: Monad m => (a -> m Bool) -> [a] -> m [a]Source

replicate :: Monad m => Int -> m a -> m [a]Source

lift :: Monad m => (a -> r) -> m a -> m rSource

lift2 :: Monad m => (a -> b -> r) -> m a -> m b -> m rSource

lift3 :: Monad m => (a -> b -> c -> r) -> m a -> m b -> m c -> m rSource

lift4 :: Monad m => (a -> b -> c -> d -> r) -> m a -> m b -> m c -> m d -> m rSource

lift5 :: Monad m => (a -> b -> c -> d -> e -> r) -> m a -> m b -> m c -> m d -> m e -> m rSource