fold :: Monoid m => t m -> m Class Method

base -Data.Foldable  

<p>Combine the elements of a structure using a monoid.</p>

base -Data.List  

<p><code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21base%29%20module%3A%28%21Data.List%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21base%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the list obtained by applying <code>f</code> to each element of <code>xs</code>, i.e.,</p><pre>map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]</pre>

base -GHC.OldList  

<p><code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21base%29%20module%3A%28%21GHC.OldList%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21base%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the list obtained by applying <code>f</code> to each element of <code>xs</code>, i.e.,</p><pre>map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]</pre>

base -Prelude  

<p><code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21base%29%20module%3A%28%21Prelude%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21base%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the list obtained by applying <code>f</code> to each element of <code>xs</code>, i.e.,</p><pre>map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]</pre>
map :: (Char -> Char) -> ByteString -> ByteString

bytestring -Data.ByteString.Char8  

<p><em>O(n)</em> <code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%20module%3A%28%21Data.ByteString.Char8%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the ByteString obtained by applying <code>f</code> to each element of <code>xs</code></p>
map :: (Char -> Char) -> ByteString -> ByteString

bytestring -Data.ByteString.Lazy.Char8  

<p><em>O(n)</em> <code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%20module%3A%28%21Data.ByteString.Lazy.Char8%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the ByteString obtained by applying <code>f</code> to each element of <code>xs</code></p>
map :: (Word8 -> Word8) -> ByteString -> ByteString

bytestring -Data.ByteString.Lazy  

<p><em>O(n)</em> <code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%20module%3A%28%21Data.ByteString.Lazy%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the ByteString obtained by applying <code>f</code> to each element of <code>xs</code>.</p>
map :: (Word8 -> Word8) -> ByteString -> ByteString

bytestring -Data.ByteString  

<p><em>O(n)</em> <code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%20module%3A%28%21Data.ByteString%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21bytestring%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f xs</code> is the ByteString obtained by applying <code>f</code> to each element of <code>xs</code>.</p>
map :: (a -> b) -> IntMap a -> IntMap b

containers -Data.IntMap.Lazy  

<p><em>O(n)</em>. Map a function over all values in the map.</p><pre>map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]</pre>
map :: (a -> b) -> IntMap a -> IntMap b

containers -Data.IntMap.Strict  

<p><em>O(n)</em>. Map a function over all values in the map.</p><pre>map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]</pre>
fold :: (a -> b -> b) -> b -> IntMap a -> b

containers -Data.IntMap  

<p><em>Deprecated.</em> As of version 0.5, replaced by <code><a href="/?query=%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%20module%3A%28%21Data.IntMap.Strict%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21foldr%29">foldr</a></code>.</p><p><em>O(n)</em>. Fold the values in the map using the given right-associative binary operator. This function is an equivalent of <code><a href="/?query=%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%20module%3A%28%21Data.IntMap.Strict%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21foldr%29">foldr</a></code> and is present for compatibility only.</p>
fold :: (Key -> b -> b) -> b -> IntSet -> b

containers -Data.IntSet  

<p><em>O(n)</em>. Fold the elements in the set using the given right-associative binary operator. This function is an equivalent of <code><a href="/?query=%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%20module%3A%28%21Data.IntSet%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21foldr%29">foldr</a></code> and is present for compatibility only.</p><p><em>Please note that fold will be deprecated in the future and removed.</em></p>
map :: (Key -> Key) -> IntSet -> IntSet

containers -Data.IntSet  

<p><em>O(n*min(n,W))</em>. <code><code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21containers%29%20module%3A%28%21Data.IntSet%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> f s</code> is the set obtained by applying <code>f</code> to each element of <code>s</code>.</p><p>It's worth noting that the size of the result may be smaller if, for some <code>(x,y)</code>, <code>x /= y && f x == f y</code></p>
map :: (a -> b) -> Map k a -> Map k b

containers -Data.Map.Lazy  

<p><em>O(n)</em>. Map a function over all values in the map.</p><pre>map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]</pre>
map :: (a -> b) -> Map k a -> Map k b

containers -Data.Map.Strict  

<p><em>O(n)</em>. Map a function over all values in the map.</p><pre>map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]</pre>
fold :: (a -> b -> b) -> b -> Map k a -> b

containers -Data.Map  

<p><em>Deprecated.</em> As of version 0.5, replaced by <code><a href="/?query=%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%20module%3A%28%21Data.Map.Lazy%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21foldr%29">foldr</a></code>.</p><p><em>O(n)</em>. Fold the values in the map using the given right-associative binary operator. This function is an equivalent of <code><a href="/?query=%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%20module%3A%28%21Data.Map.Lazy%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21foldr%29">foldr</a></code> and is present for compatibility only.</p>
fold :: (a -> b -> b) -> b -> Set a -> b

containers -Data.Set  

<p><em>O(n)</em>. Fold the elements in the set using the given right-associative binary operator. This function is an equivalent of <code><a href="/?query=%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%20module%3A%28%21Data.Set%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21foldr%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21foldr%29">foldr</a></code> and is present for compatibility only.</p><p><em>Please note that fold will be deprecated in the future and removed.</em></p>
map :: Ord b => (a -> b) -> Set a -> Set b

containers -Data.Set  

<p><em>O(n*log n)</em>. <code><code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21containers%29%20module%3A%28%21Data.Set%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21containers%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> f s</code> is the set obtained by applying <code>f</code> to each element of <code>s</code>.</p><p>It's worth noting that the size of the result may be smaller if, for some <code>(x,y)</code>, <code>x /= y && f x == f y</code></p>
map :: (Char -> Char) -> Stream Char -> Stream Char

text -Data.Text.Internal.Fusion.Common  

<p><em>O(n)</em> <code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21text%29%20module%3A%28%21Data.Text.Internal.Fusion.Common%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21text%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f </code>xs is the Stream Char obtained by applying <code>f</code> to each element of <code>xs</code>.</p>
map :: (Char -> Char) -> Text -> Text

text -Data.Text.Lazy  

<p><em>O(n)</em> <code><a href="/?query=%28%28name%3A%28%21map%29%20package%3A%28%21text%29%20module%3A%28%21Data.Text.Lazy%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21map%29%20package%3A%28%21text%29%29%5E10.0%29%20OR%20name%3A%28%21map%29">map</a></code> <code>f</code> <code>t</code> is the <code><a href="/?query=%28%28name%3A%28%21Text%29%20package%3A%28%21text%29%20module%3A%28%21Data.Text.Lazy%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text%29%20package%3A%28%21text%29%29%5E10.0%29%20OR%20name%3A%28%21Text%29">Text</a></code> obtained by applying <code>f</code> to each element of <code>t</code>. Subject to fusion. Performs replacement on invalid scalar values.</p>