:: (bullet -> IO picture) -> [bullet] -> IO [picture]

Applies a given function to every item in a list, and returns the new list. Unlike the system's mapM, items are evaluated lazily.
mapM f is equivalent to sequence . map f.
Maps an IO-performing function over any Traversable data type, performing all the IO actions concurrently, and returning the original data structure with the arguments replaced by the results. If any of the actions throw an exception, then all other actions are cancelled and the exception is re-thrown. For example, mapConcurrently works with lists:
pages <- mapConcurrently getURL ["url1", "url2", "url3"]
Take into account that async will try to immediately spawn a thread for each element of the Traversable, so running this on large inputs without care may lead to resource exhaustion (of memory, file descriptors, or other limited resources).
Like mapM but uses sequence'.
Generalized version of mapConcurrently.
Generalized version of mapConcurrently.
Like mapM, but applying the function to the individual list items in parallel.
Traverses the function over the list and produces a lazy list in a monadic context. It is intended to be like the "standard" traverse except that the list is generated lazily.
Apply a function on many item in a concurrent way
Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.

Examples

Basic usage: In the first two examples we show each evaluated action mapping to the output structure.
>>> traverse Just [1,2,3,4]
Just [1,2,3,4]
>>> traverse id [Right 1, Right 2, Right 3, Right 4]
Right [1,2,3,4]
In the next examples, we show that Nothing and Left values short circuit the created structure.
>>> traverse (const Nothing) [1,2,3,4]
Nothing
>>> traverse (\x -> if odd x then Just x else Nothing)  [1,2,3,4]
Nothing
>>> traverse id [Right 1, Right 2, Right 3, Right 4, Left 0]
Left 0
Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.
Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

Examples

mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.
Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
O(n) Apply the monadic action to all elements of the vector, yielding a vector of results
Effectful map over vector.
Analog of traverse from Traversable.
Monadic map over vector.
forConcurrently is mapConcurrently with its arguments flipped
pages <- forConcurrently ["url1", "url2", "url3"] $ \url -> getURL url
Generalized version of forConcurrently.
Generalized version of forConcurrently.
Like forM, but applying the function to the individual list items in parallel.