monadlist-0.0.2: Monadic versions of list functions

Safe Haskell | Safe-Inferred
Language | Haskell98

Control.Monad.ListM

# Documentation

mapMP :: (Monad m, MonadPlus p) => (a -> m b) -> [a] -> m (p b) Source #

filterMP :: (Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p a) Source #

intersperseM :: (Monad m, MonadPlus p) => m a -> [a] -> m (p a) Source #

intercalateM :: (Monad m, MonadPlus p) => m (p a) -> [p a] -> m (p a) Source #

foldM1 :: Monad m => (a -> a -> m a) -> [a] -> m a Source #

joinMap :: Monad m => (a -> m b) -> m a -> m b Source #

joinMapM :: (Monad m, MonadPlus p) => (a -> m (p b)) -> [a] -> m (p b) Source #

anyM :: (Monad m, Traversable t) => (a -> m Bool) -> t a -> m Bool Source #

allM :: (Monad m, Traversable t) => (a -> m Bool) -> t a -> m Bool Source #

scanM :: (Monad m, MonadPlus p) => (a -> b -> m a) -> a -> [b] -> m (p a) Source #

mapAccumM :: (Monad m, MonadPlus p) => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, p y) Source #

iterateM :: (Monad m, MonadPlus p) => (a -> m a) -> a -> m (p a) Source #

takeM :: (Integral i, Monad m, MonadPlus p) => i -> [m a] -> m (p a) Source #

dropM :: (Integral i, Monad m) => i -> [m a] -> m [a] Source #

splitAtM :: (Integral i, Monad m, MonadPlus p) => i -> [m a] -> m (p a, [a]) Source #

takeWhileM :: (Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p a) Source #

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

spanM :: (Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p a, [a]) Source #

breakM :: (Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p a, [a]) Source #

elemM :: (Eq a, Monad m) => a -> [a] -> m Bool Source #

notElemM :: (Eq a, Monad m) => a -> [a] -> m Bool Source #

lookupM :: (Eq a, Monad m, MonadPlus p) => a -> [m (a, b)] -> m (p b) Source #

findM :: (Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p a) Source #

partitionM :: (Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p a, [a]) Source #

elemIndexM :: (Eq a, Integral i, Monad m, MonadPlus p) => a -> [a] -> m (p i) Source #

elemIndicesM :: (Eq a, Integral i, Monad m, MonadPlus p) => a -> [a] -> m (p i) Source #

findIndexM :: (Integral i, Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p i) Source #

findIndicesM :: (Integral i, Monad m, MonadPlus p) => (a -> m Bool) -> [a] -> m (p i) Source #

zipWithM3 :: (Monad m, MonadPlus p) => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m (p d) Source #

zipWithM4 :: (Monad m, MonadPlus p) => (a -> b -> c -> d -> m e) -> [a] -> [b] -> [c] -> [d] -> m (p e) Source #

zipWithM5 :: (Monad m, MonadPlus p) => (a -> b -> c -> d -> e -> m f) -> [a] -> [b] -> [c] -> [d] -> [e] -> m (p f) Source #

zipWithM6 :: (Monad m, MonadPlus p) => (a -> b -> c -> d -> e -> f -> m g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> m (p g) Source #

nubM :: (Eq a, Monad m, MonadPlus p) => [a] -> m (p a) Source #

nubByM :: (Monad m, MonadPlus p) => (a -> a -> m Bool) -> [a] -> m (p a) Source #

deleteM :: (Eq a, Monad m) => a -> [a] -> m [a] Source #

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

deleteFirstsM :: (Eq a, Monad m) => [a] -> [a] -> m [a] Source #

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

unionM :: (Eq a, Monad m) => [a] -> [a] -> m [a] Source #

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

intersectM :: (Eq a, Monad m, MonadPlus p) => [a] -> [a] -> m (p a) Source #

intersectByM :: (Monad m, MonadPlus p) => (a -> a -> m Bool) -> [a] -> [a] -> m (p a) Source #

groupM :: (Eq a, Monad m, MonadPlus p, MonadPlus q) => [a] -> m (p (q a)) Source #

groupByM :: (Monad m, MonadPlus p, MonadPlus q) => (a -> a -> m Bool) -> [a] -> m (p (q a)) Source #

sortM :: (Ord a, Monad m) => [a] -> m [a] Source #

sortByM :: Monad m => (a -> a -> m Ordering) -> [a] -> m [a] Source #

insertM :: (Ord a, Monad m) => a -> [a] -> m [a] Source #

insertByM :: Monad m => (a -> a -> m Ordering) -> a -> [a] -> m [a] Source #

maximumM :: (Ord a, Monad m) => [a] -> m a Source #

maximumByM :: Monad m => (a -> a -> m Ordering) -> [a] -> m a Source #

minimumM :: (Ord a, Monad m) => [a] -> m a Source #

minimumByM :: Monad m => (a -> a -> m Ordering) -> [a] -> m a Source #