**Packages**- is:exact

map `f xs` is the list obtained by applying `f`
to each element of `xs`, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]

Map a function over a NonEmpty stream.

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_.

An associative operation
**NOTE**: This method is redundant and has the default
implementation `mappend = '(<>)'` since
*base-4.11.0.0*.

The mapMaybe function is a version of map which can
throw out elements. In particular, the functional argument returns
something of type `Maybe b`. If this is Nothing,
no element is added on to the result list. If it is `Just
b`, then `b` is included in the result list.
**Examples**

Using `mapMaybe f x` is a shortcut for
`catMaybes $ map f x` in most cases:

>>> import Text.Read ( readMaybe ) >>> let readMaybeInt = readMaybe :: String -> Maybe Int >>> mapMaybe readMaybeInt ["1", "Foo", "3"] [1,3] >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"] [1,3]If we map the Just constructor, the entire list should be returned:

>>> mapMaybe Just [1,2,3] [1,2,3]

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.

This function maps one exception into another as proposed in the paper
"A semantics for imprecise exceptions".

Map a function over all the elements of a container and concatenate
the resulting lists.

Map each element of the structure to a monoid, and combine the
results.

Given a means of mapping the elements of a structure to lists,
computes the concatenation of all such lists in order.

Alias for bitraverse_.

A default definition of bifoldMap in terms of the
Bitraversable operations.

bifoldMapDefault f g ≡ getConst . bitraverse (Const . f) (Const . g)

The bimapAccumL function behaves like a combination of
bimap and bifoldl; it traverses a structure from left to
right, threading a state of type `a` and using the given
actions to compute new elements for the structure.

The bimapAccumR function behaves like a combination of
bimap and bifoldl; it traverses a structure from right
to left, threading a state of type `a` and using the given
actions to compute new elements for the structure.

A default definition of bimap in terms of the
Bitraversable operations.

bimapDefault f g ≡ runIdentity . bitraverse (Identity . f) (Identity . g)

Alias for bitraverse.