**Packages**- is:exact
- base-compat
- base-prelude
- case-insensitive
- unordered-containers
- Shpadoinkle
- Shpadoinkle-html
- Shpadoinkle-lens
- StateVar
- adjunctions
- aeson
- async
- either

Map a function over a NonEmpty stream.

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, ...]

Transform the original string-like value but keep it case insensitive.

Transform the properties of some Node. This has no effect on
`TextNode`s or `Potato`es.

Transform the properties of some Node. This has no effect on
`TextNode`s or `Potato`es.

Like forLens but with the lambda as the first argument.

Change the type of a StateVar

Same as fmap. Provided for the consistency with
`ToJSONKeyFunction`.

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"]

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

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

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 mapBoth function takes two functions and applies the first
if iff the value takes the form `Left _` and the second
if the value takes the form `Right _`.
Using `Data.Bifunctor`:
`Control.Arrow`:

mapBoth = bimapUsing

mapBoth = (+++)

>>> mapBoth (*2) (*3) (Left 4) Left 8

>>> mapBoth (*2) (*3) (Right 4) Right 12

The mapLeft function takes a function and applies it to an
Either value iff the value takes the form `Left _`.
Using `Data.Bifunctor`:
`Control.Arrow`:
`Control.Lens`:

mapLeft = firstUsing

mapLeft = (left)Using

mapLeft = over _Left

>>> mapLeft (*2) (Left 4) Left 8

>>> mapLeft (*2) (Right "hello") Right "hello"