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