map -package:dlist -package:blaze-html -package:containers -package:Cabal-syntax package:ghc

Apply a function to each element of a Stream, lazily
Map a function over all values in the map.
map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
map f s is the set obtained by applying f to each element of s. It's worth noting that the size of the result may be smaller if, for some (x,y), x /= y && f x == f y
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, ...]
this means that map id == id

Examples

>>> map (+1) [1, 2, 3]
[2,3,4]
>>> map id [1, 2, 3]
[1,2,3]
>>> map (\n -> 3 * n + 1) [1, 2, 3]
[4,7,10]
Map a function f over all the ModSummaries. To preserve invariants f can't change the isBoot status.
map a function over the nodes of a Block
A strict mapBlock
map over a block, with different functions to apply to first nodes, middle nodes and last nodes respectively. The map is strict.