Module Control.Monad

Summary of exported operations:

filterM :: Applicative a => (b -> a Bool) -> [b] -> a [b]  Deterministic 
This generalizes the list-based filter function.
(>=>) :: Monad a => (b -> a c) -> (c -> a d) -> b -> a d  Deterministic 
Left-to-right composition of Kleisli arrows.
(<=<) :: Monad a => (b -> a c) -> (d -> a b) -> d -> a c  Deterministic 
Right-to-left composition of Kleisli arrows.
forever :: Applicative a => a b -> a c  Deterministic 
Repeat an action indefinitely.
mapAndUnzipM :: Applicative a => (b -> a (c,d)) -> [b] -> a ([c],[d])  Deterministic 
The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists.
zipWithM :: Applicative a => (b -> c -> a d) -> [b] -> [c] -> a [d]  Deterministic 
The zipWithM function generalizes zipWith to arbitrary applicative functors.
zipWithM_ :: Applicative a => (b -> c -> a d) -> [b] -> [c] -> a ()  Deterministic 
zipWithM_ is the extension of zipWithM which ignores the final result.
foldM :: Monad a => (b -> c -> a b) -> b -> [c] -> a b  Deterministic 
The foldM function is analogous to foldl, except that its result is encapsulated in a monad.
foldM_ :: Monad a => (b -> c -> a b) -> b -> [c] -> a ()  Deterministic 
Like foldM, but discards the result.
replicateM :: Applicative a => Int -> a b -> a [b]  Deterministic 
replicateM_ :: Applicative a => Int -> a b -> a ()  Deterministic 
Like replicateM, but discards the result.
unless :: Applicative a => Bool -> a () -> a ()  Deterministic 
The reverse of when.
liftM3 :: Monad a => (b -> c -> d -> e) -> a b -> a c -> a d -> a e  Deterministic 
join :: Monad a => a (a b) -> a b  Deterministic 
Removes one level of monadic structure, i.e.
void :: Functor a => a b -> a ()  Deterministic 
Ignores the result of the evaluation.

Exported operations:

filterM :: Applicative a => (b -> a Bool) -> [b] -> a [b]  Deterministic 

This generalizes the list-based filter function.

(>=>) :: Monad a => (b -> a c) -> (c -> a d) -> b -> a d  Deterministic 

Left-to-right composition of Kleisli arrows.

Further infos:
  • defined as right-associative infix operator with precedence 1

(<=<) :: Monad a => (b -> a c) -> (d -> a b) -> d -> a c  Deterministic 

Right-to-left composition of Kleisli arrows. @(>=>)@, with the arguments flipped.

Further infos:
  • defined as right-associative infix operator with precedence 1

forever :: Applicative a => a b -> a c  Deterministic 

Repeat an action indefinitely.

mapAndUnzipM :: Applicative a => (b -> a (c,d)) -> [b] -> a ([c],[d])  Deterministic 

The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state-transforming monad.

zipWithM :: Applicative a => (b -> c -> a d) -> [b] -> [c] -> a [d]  Deterministic 

The zipWithM function generalizes zipWith to arbitrary applicative functors.

zipWithM_ :: Applicative a => (b -> c -> a d) -> [b] -> [c] -> a ()  Deterministic 

zipWithM_ is the extension of zipWithM which ignores the final result.

foldM :: Monad a => (b -> c -> a b) -> b -> [c] -> a b  Deterministic 

The foldM function is analogous to foldl, except that its result is encapsulated in a monad.

foldM_ :: Monad a => (b -> c -> a b) -> b -> [c] -> a ()  Deterministic 

Like foldM, but discards the result.

replicateM :: Applicative a => Int -> a b -> a [b]  Deterministic 

replicateM_ :: Applicative a => Int -> a b -> a ()  Deterministic 

Like replicateM, but discards the result.

unless :: Applicative a => Bool -> a () -> a ()  Deterministic 

The reverse of when.

liftM3 :: Monad a => (b -> c -> d -> e) -> a b -> a c -> a d -> a e  Deterministic 

join :: Monad a => a (a b) -> a b  Deterministic 

Removes one level of monadic structure, i.e. flattens the monad.

void :: Functor a => a b -> a ()  Deterministic 

Ignores the result of the evaluation.