map -package:containers -package:Cabal-syntax -is:exact -package:base-compat-batteries -package:basement -package:bytestring -package:dlist -package:dense-linear-algebra -package:os-string -package:ghc -package:pipes -package:invertible -package:filepath -package:aeson -package:psqueues -package:conduit -package:base-prelude -package:vector -package:regex-tdfa -package:unordered-containers -package:incipit-base -package:text

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 (+1) [1, 2, 3]
[2,3,4]
Map a function over a NonEmpty stream.
Combinator for the <map> element. Example:
map $ span $ toHtml "foo"
Result:
<map><span>foo</span></map>
Transform the original string-like value but keep it case insensitive.
Fold pairs into a map.
Generates a map using a Range to determine the length. This may fail to generate anything if the keys produced by the generator do not account for a large enough number of unique items to satify the required map size.
O(n) Transform this map by applying a function to every value.
Map a function over a Stream
Type-level fmap for type-level functors. Note: this name clashes with Map from containers. FMap is provided as a synonym to avoid this.

Example

>>> data Example where Ex :: a -> Example  -- Hide the type of examples to avoid brittleness in different GHC versions

>>> data AddMul :: Nat -> Nat -> Exp Nat

>>> type instance Eval (AddMul x y) = (x TL.+ y) TL.* (x TL.+ y)

>>> :kind! Ex (Eval (Map (AddMul 2) '[0, 1, 2, 3, 4]) :: [Nat])
Ex (Eval (Map (AddMul 2) '[0, 1, 2, 3, 4]) :: [Nat]) :: Example
= Ex [4, 9, 16, 25, 36]
A Map from keys k to values a. The Semigroup operation for Map is union, which prefers values from the left operand. If m1 maps a key k to a value a1, and m2 maps the same key to a different value a2, then their union m1 <> m2 maps k to a1.
Hash-table, based on STM-specialized Hash Array Mapped Trie.
Invariant preserving version of Map from the containers packages, suitable for use with Uniplate. Use toMap to construct values, and fromMap to deconstruct values.
Monadic variant of mapAccumL.
Map both the return value and final generator of a computation using the given function.