/usr/share/doc/libghc-hashmap-doc/html/Data-HashMap.html is in libghc-hashmap-doc 1.3.0.1-3build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.HashMap</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-HashMap.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-HashMap.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hashmap-1.3.0.1: Persistent containers Map and Set based on hashing.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>fox@ucw.cz</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Data.HashMap</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Operators
</a></li><li><a href="#g:2">Query
</a></li><li><a href="#g:3">Construction
</a><ul><li><a href="#g:4">Insertion
</a></li><li><a href="#g:5">Delete/Update
</a></li></ul></li><li><a href="#g:6">Combine
</a><ul><li><a href="#g:7">Union
</a></li><li><a href="#g:8">Difference
</a></li><li><a href="#g:9">Intersection
</a></li></ul></li><li><a href="#g:10">Traversal
</a><ul><li><a href="#g:11">Map
</a></li><li><a href="#g:12">Fold
</a></li></ul></li><li><a href="#g:13">Conversion
</a><ul><li><a href="#g:14">Lists
</a></li></ul></li><li><a href="#g:15">Filter
</a></li><li><a href="#g:16">Submap
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Persistent <code><a href="Data-HashMap.html#t:Map">Map</a></code> based on hashing, which is defined as
</p><pre>
data <code><a href="Data-HashMap.html#t:Map">Map</a></code> k v = <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-IntMap.html#t:IntMap">IntMap</a></code> (Some k v)
</pre><p>is an <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-IntMap.html#t:IntMap">IntMap</a></code> indexed by hash values of keys,
containing a value of <code>Some e</code>. That contains either one
<code>(<code>k</code>, <code>v</code>)</code> pair or a <code><code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Map.html#t:Map">Map</a></code> k v</code> with keys of the same hash values.
</p><p>The interface of a <code><a href="Data-HashMap.html#t:Map">Map</a></code> is a suitable subset of <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-IntMap.html#t:IntMap">IntMap</a></code>
and can be used as a drop-in replacement of <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Map.html#t:Map">Map</a></code>.
</p><p>The complexity of operations is determined by the complexities of
<code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-IntMap.html#t:IntMap">IntMap</a></code> and <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Map.html#t:Map">Map</a></code> operations. See the sources of
<code><a href="Data-HashMap.html#t:Map">Map</a></code> to see which operations from <code>containers</code> package are used.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Map">Map</a> k v</li><li class="src short"><span class="keyword">type</span> <a href="#t:HashMap">HashMap</a> k v = <a href="Data-HashMap.html#t:Map">Map</a> k v</li><li class="src short"><a href="#v:-33-">(!)</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => <a href="Data-HashMap.html#t:Map">Map</a> k a -> k -> a</li><li class="src short"><a href="#v:-92--92-">(\\)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:null">null</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:size">size</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:member">member</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:notMember">notMember</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:lookup">lookup</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:findWithDefault">findWithDefault</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => a -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> a</li><li class="src short"><a href="#v:empty">empty</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:singleton">singleton</a> :: <a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k => k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:insert">insert</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:insertWith">insertWith</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> a -> a) -> k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:insertWithKey">insertWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a -> a) -> k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:insertLookupWithKey">insertLookupWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a -> a) -> k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a, <a href="Data-HashMap.html#t:Map">Map</a> k a)</li><li class="src short"><a href="#v:delete">delete</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:adjust">adjust</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:adjustWithKey">adjustWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:update">update</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:updateWithKey">updateWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:updateLookupWithKey">updateLookupWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a, <a href="Data-HashMap.html#t:Map">Map</a> k a)</li><li class="src short"><a href="#v:alter">alter</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:union">union</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:unionWith">unionWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> a -> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:unionWithKey">unionWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> a -> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:unions">unions</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => [<a href="Data-HashMap.html#t:Map">Map</a> k a] -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:unionsWith">unionsWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> a -> a) -> [<a href="Data-HashMap.html#t:Map">Map</a> k a] -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:difference">difference</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:differenceWith">differenceWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:differenceWithKey">differenceWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:intersection">intersection</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:intersectionWith">intersectionWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k c</li><li class="src short"><a href="#v:intersectionWithKey">intersectionWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> b -> c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k c</li><li class="src short"><a href="#v:map">map</a> :: (a -> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b</li><li class="src short"><a href="#v:mapWithKey">mapWithKey</a> :: (k -> a -> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b</li><li class="src short"><a href="#v:mapAccum">mapAccum</a> :: (a -> b -> (a, c)) -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> (a, <a href="Data-HashMap.html#t:Map">Map</a> k c)</li><li class="src short"><a href="#v:mapAccumWithKey">mapAccumWithKey</a> :: (a -> k -> b -> (a, c)) -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> (a, <a href="Data-HashMap.html#t:Map">Map</a> k c)</li><li class="src short"><a href="#v:fold">fold</a> :: (a -> b -> b) -> b -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> b</li><li class="src short"><a href="#v:foldWithKey">foldWithKey</a> :: (k -> a -> b -> b) -> b -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> b</li><li class="src short"><a href="#v:elems">elems</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [a]</li><li class="src short"><a href="#v:keys">keys</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [k]</li><li class="src short"><a href="#v:keysSet">keysSet</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Set.html#t:Set">Set</a> k</li><li class="src short"><a href="#v:assocs">assocs</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [(k, a)]</li><li class="src short"><a href="#v:toList">toList</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [(k, a)]</li><li class="src short"><a href="#v:fromList">fromList</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => [(k, a)] -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:fromListWith">fromListWith</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> a -> a) -> [(k, a)] -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:fromListWithKey">fromListWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a -> a) -> [(k, a)] -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:filter">filter</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:filterWithKey">filterWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a</li><li class="src short"><a href="#v:partition">partition</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k a, <a href="Data-HashMap.html#t:Map">Map</a> k a)</li><li class="src short"><a href="#v:partitionWithKey">partitionWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k a, <a href="Data-HashMap.html#t:Map">Map</a> k a)</li><li class="src short"><a href="#v:mapMaybe">mapMaybe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b</li><li class="src short"><a href="#v:mapMaybeWithKey">mapMaybeWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b</li><li class="src short"><a href="#v:mapEither">mapEither</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> b c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k b, <a href="Data-HashMap.html#t:Map">Map</a> k c)</li><li class="src short"><a href="#v:mapEitherWithKey">mapEitherWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> b c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k b, <a href="Data-HashMap.html#t:Map">Map</a> k c)</li><li class="src short"><a href="#v:isSubmapOf">isSubmapOf</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a) => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSubmapOfBy">isSubmapOfBy</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isProperSubmapOf">isProperSubmapOf</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a) => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isProperSubmapOfBy">isProperSubmapOfBy</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Map" class="def">Map</a> k v <a href="src/Data-HashMap.html#Map" class="link">Source</a></p><div class="doc"><p>The abstract type of a <code>Map</code>. Its interface is a suitable
subset of <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-IntMap.html#t:IntMap">IntMap</a></code>.
</p></div><div class="subs instances"><p id="control.i:Map" class="caption collapser" onclick="toggleSection('i:Map')">Instances</p><div id="section.i:Map" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable2">Typeable2</a> <a href="Data-HashMap.html#t:Map">Map</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-HashMap.html#t:Map">Map</a> k)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="Data-HashMap.html#t:Map">Map</a> k)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Traversable.html#t:Traversable">Traversable</a> (<a href="Data-HashMap.html#t:Map">Map</a> k)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> v) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-HashMap.html#t:Map">Map</a> k v)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Data.html#t:Data">Data</a> k, <a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Data.html#t:Data">Data</a> a) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Data.html#t:Data">Data</a> (<a href="Data-HashMap.html#t:Map">Map</a> k a)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-HashMap.html#t:Map">Map</a> k v)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> k, <a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> a) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> (<a href="Data-HashMap.html#t:Map">Map</a> k a)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> a) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Data-HashMap.html#t:Map">Map</a> k a)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Data-HashMap.html#t:Map">Map</a> k a)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/deepseq-1.3.0.1/Control-DeepSeq.html#t:NFData">NFData</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/deepseq-1.3.0.1/Control-DeepSeq.html#t:NFData">NFData</a> v) => <a href="/usr/share/doc/ghc-doc/html/libraries/deepseq-1.3.0.1/Control-DeepSeq.html#t:NFData">NFData</a> (<a href="Data-HashMap.html#t:Map">Map</a> k v)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:HashMap" class="def">HashMap</a> k v = <a href="Data-HashMap.html#t:Map">Map</a> k v<a href="src/Data-HashMap.html#HashMap" class="link">Source</a></p><div class="doc"><div class="warning"><p>Deprecated: HashMap is deprecated. Please use Map instead.
</p></div><p>The <code>HashMap</code> is a type synonym for <code>Map</code> for backward compatibility.
It is deprecated and will be removed in furture releases.
</p></div></div><h1 id="g:1">Operators
</h1><div class="top"><p class="src"><a name="v:-33-" class="def">(!)</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => <a href="Data-HashMap.html#t:Map">Map</a> k a -> k -> a<a href="src/Data-HashMap.html#%21" class="link">Source</a></p><div class="doc"><p>Find the value at a key.
Calls <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:error">error</a></code> when the element can not be found.
</p></div></div><div class="top"><p class="src"><a name="v:-92--92-" class="def">(\\)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#%5C%5C" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-HashMap.html#v:difference">difference</a></code>.
</p></div></div><h1 id="g:2">Query
</h1><div class="top"><p class="src"><a name="v:null" class="def">null</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#null" class="link">Source</a></p><div class="doc"><p>Is the map empty?
</p></div></div><div class="top"><p class="src"><a name="v:size" class="def">size</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a><a href="src/Data-HashMap.html#size" class="link">Source</a></p><div class="doc"><p>Number of elements in the map.
</p></div></div><div class="top"><p class="src"><a name="v:member" class="def">member</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#member" class="link">Source</a></p><div class="doc"><p>Is the key a member of the map?
</p></div></div><div class="top"><p class="src"><a name="v:notMember" class="def">notMember</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#notMember" class="link">Source</a></p><div class="doc"><p>Is the key not a member of the map?
</p></div></div><div class="top"><p class="src"><a name="v:lookup" class="def">lookup</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Data-HashMap.html#lookup" class="link">Source</a></p><div class="doc"><p>Lookup the value at a key in the map.
</p></div></div><div class="top"><p class="src"><a name="v:findWithDefault" class="def">findWithDefault</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => a -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> a<a href="src/Data-HashMap.html#findWithDefault" class="link">Source</a></p><div class="doc"><p>The expression <code>(<code><a href="Data-HashMap.html#v:findWithDefault">findWithDefault</a></code> def k map)</code> returns the value at key
<code>k</code> or returns <code>def</code> when the key is not an element of the map.
</p></div></div><h1 id="g:3">Construction
</h1><div class="top"><p class="src"><a name="v:empty" class="def">empty</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#empty" class="link">Source</a></p><div class="doc"><p>The empty map.
</p></div></div><div class="top"><p class="src"><a name="v:singleton" class="def">singleton</a> :: <a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k => k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#singleton" class="link">Source</a></p><div class="doc"><p>A map of one element.
</p></div></div><h2 id="g:4">Insertion
</h2><div class="top"><p class="src"><a name="v:insert" class="def">insert</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#insert" class="link">Source</a></p><div class="doc"><p>Insert a new key/value pair in the map. If the key is already present in
the map, the associated value is replaced with the supplied value, i.e.
<code><a href="Data-HashMap.html#v:insert">insert</a></code> is equivalent to <code><code><a href="Data-HashMap.html#v:insertWith">insertWith</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:const">const</a></code></code>.
</p></div></div><div class="top"><p class="src"><a name="v:insertWith" class="def">insertWith</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> a -> a) -> k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#insertWith" class="link">Source</a></p><div class="doc"><p>Insert with a combining function. <code><code><a href="Data-HashMap.html#v:insertWith">insertWith</a></code> f key value mp</code> will
insert the pair (key, value) into <code>mp</code> if key does not exist in the map. If
the key does exist, the function will insert <code>f new_value old_value</code>.
</p></div></div><div class="top"><p class="src"><a name="v:insertWithKey" class="def">insertWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a -> a) -> k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#insertWithKey" class="link">Source</a></p><div class="doc"><p>Insert with a combining function. <code><code><a href="Data-HashMap.html#v:insertWithKey">insertWithKey</a></code> f key value mp</code> will
insert the pair (key, value) into <code>mp</code> if key does not exist in the map. If
the key does exist, the function will insert <code>f key new_value old_value</code>.
</p></div></div><div class="top"><p class="src"><a name="v:insertLookupWithKey" class="def">insertLookupWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a -> a) -> k -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a, <a href="Data-HashMap.html#t:Map">Map</a> k a)<a href="src/Data-HashMap.html#insertLookupWithKey" class="link">Source</a></p><div class="doc"><p>The expression (<code><code><a href="Data-HashMap.html#v:insertLookupWithKey">insertLookupWithKey</a></code> f k x map</code>) is a pair where the
first element is equal to (<code><code><a href="Data-HashMap.html#v:lookup">lookup</a></code> k map</code>) and the second element equal to
(<code><code><a href="Data-HashMap.html#v:insertWithKey">insertWithKey</a></code> f k x map</code>).
</p></div></div><h2 id="g:5">Delete/Update
</h2><div class="top"><p class="src"><a name="v:delete" class="def">delete</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#delete" class="link">Source</a></p><div class="doc"><p>Delete a key and its value from the map. When the key is not
a member of the map, the original map is returned.
</p></div></div><div class="top"><p class="src"><a name="v:adjust" class="def">adjust</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#adjust" class="link">Source</a></p><div class="doc"><p>Adjust a value at a specific key. When the key is not a member of the map,
the original map is returned.
</p></div></div><div class="top"><p class="src"><a name="v:adjustWithKey" class="def">adjustWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#adjustWithKey" class="link">Source</a></p><div class="doc"><p>Adjust a value at a specific key. When the key is not a member of the map,
the original map is returned.
</p></div></div><div class="top"><p class="src"><a name="v:update" class="def">update</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#update" class="link">Source</a></p><div class="doc"><p>The expression (<code><code><a href="Data-HashMap.html#v:update">update</a></code> f k map</code>) updates the value <code>x</code> at <code>k</code> (if it is
in the map). If (<code>f x</code>) is <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>, the element is deleted. If it is
(<code><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code> y</code>), the key <code>k</code> is bound to the new value <code>y</code>.
</p></div></div><div class="top"><p class="src"><a name="v:updateWithKey" class="def">updateWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#updateWithKey" class="link">Source</a></p><div class="doc"><p>The expression (<code><code><a href="Data-HashMap.html#v:update">update</a></code> f k map</code>) updates the value <code>x</code> at <code>k</code> (if it is
in the map). If (<code>f k x</code>) is <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>, the element is deleted. If it is
(<code><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code> y</code>), the key <code>k</code> is bound to the new value <code>y</code>.
</p></div></div><div class="top"><p class="src"><a name="v:updateLookupWithKey" class="def">updateLookupWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a, <a href="Data-HashMap.html#t:Map">Map</a> k a)<a href="src/Data-HashMap.html#updateLookupWithKey" class="link">Source</a></p><div class="doc"><p>Lookup and update. The function returns original value, if it is updated.
This is different behavior than <code><a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Map.html#t:updateLookupWithKey">updateLookupWithKey</a></code>. Returns the
original key value if the map entry is deleted.
</p></div></div><div class="top"><p class="src"><a name="v:alter" class="def">alter</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> k -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#alter" class="link">Source</a></p><div class="doc"><p>The expression (<code><code><a href="Data-HashMap.html#v:alter">alter</a></code> f k map</code>) alters the value <code>x</code> at <code>k</code>, or absence
thereof. <code><a href="Data-HashMap.html#v:alter">alter</a></code> can be used to insert, delete, or update a value in an
<code><a href="Data-HashMap.html#t:Map">Map</a></code>.
</p></div></div><h1 id="g:6">Combine
</h1><h2 id="g:7">Union
</h2><div class="top"><p class="src"><a name="v:union" class="def">union</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#union" class="link">Source</a></p><div class="doc"><p>The (left-biased) union of two maps.
It prefers the first map when duplicate keys are encountered,
i.e. (<code><code><a href="Data-HashMap.html#v:union">union</a></code> == <code><a href="Data-HashMap.html#v:unionWith">unionWith</a></code> <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:const">const</a></code></code>).
</p></div></div><div class="top"><p class="src"><a name="v:unionWith" class="def">unionWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> a -> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#unionWith" class="link">Source</a></p><div class="doc"><p>The union with a combining function.
</p></div></div><div class="top"><p class="src"><a name="v:unionWithKey" class="def">unionWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> a -> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#unionWithKey" class="link">Source</a></p><div class="doc"><p>The union with a combining function.
</p></div></div><div class="top"><p class="src"><a name="v:unions" class="def">unions</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => [<a href="Data-HashMap.html#t:Map">Map</a> k a] -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#unions" class="link">Source</a></p><div class="doc"><p>The union of a list of maps.
</p></div></div><div class="top"><p class="src"><a name="v:unionsWith" class="def">unionsWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> a -> a) -> [<a href="Data-HashMap.html#t:Map">Map</a> k a] -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#unionsWith" class="link">Source</a></p><div class="doc"><p>The union of a list of maps, with a combining operation.
</p></div></div><h2 id="g:8">Difference
</h2><div class="top"><p class="src"><a name="v:difference" class="def">difference</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#difference" class="link">Source</a></p><div class="doc"><p>Difference between two maps (based on keys).
</p></div></div><div class="top"><p class="src"><a name="v:differenceWith" class="def">differenceWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#differenceWith" class="link">Source</a></p><div class="doc"><p>Difference with a combining function.
</p></div></div><div class="top"><p class="src"><a name="v:differenceWithKey" class="def">differenceWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#differenceWithKey" class="link">Source</a></p><div class="doc"><p>Difference with a combining function. When two equal keys are
encountered, the combining function is applied to the key and both values.
If it returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>, the element is discarded (proper set difference).
If it returns (<code><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code> y</code>), the element is updated with a new value <code>y</code>.
</p></div></div><h2 id="g:9">Intersection
</h2><div class="top"><p class="src"><a name="v:intersection" class="def">intersection</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#intersection" class="link">Source</a></p><div class="doc"><p>The (left-biased) intersection of two maps (based on keys).
</p></div></div><div class="top"><p class="src"><a name="v:intersectionWith" class="def">intersectionWith</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k c<a href="src/Data-HashMap.html#intersectionWith" class="link">Source</a></p><div class="doc"><p>The intersection with a combining function.
</p></div></div><div class="top"><p class="src"><a name="v:intersectionWithKey" class="def">intersectionWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> b -> c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="Data-HashMap.html#t:Map">Map</a> k c<a href="src/Data-HashMap.html#intersectionWithKey" class="link">Source</a></p><div class="doc"><p>The intersection with a combining function.
</p></div></div><h1 id="g:10">Traversal
</h1><h2 id="g:11">Map
</h2><div class="top"><p class="src"><a name="v:map" class="def">map</a> :: (a -> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b<a href="src/Data-HashMap.html#map" class="link">Source</a></p><div class="doc"><p>Map a function over all values in the map.
</p></div></div><div class="top"><p class="src"><a name="v:mapWithKey" class="def">mapWithKey</a> :: (k -> a -> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b<a href="src/Data-HashMap.html#mapWithKey" class="link">Source</a></p><div class="doc"><p>Map a function over all values in the map.
</p></div></div><div class="top"><p class="src"><a name="v:mapAccum" class="def">mapAccum</a> :: (a -> b -> (a, c)) -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> (a, <a href="Data-HashMap.html#t:Map">Map</a> k c)<a href="src/Data-HashMap.html#mapAccum" class="link">Source</a></p><div class="doc"><p>The function <code><code><a href="Data-HashMap.html#v:mapAccum">mapAccum</a></code></code> threads an accumulating argument through the map
in unspecified order of keys.
</p></div></div><div class="top"><p class="src"><a name="v:mapAccumWithKey" class="def">mapAccumWithKey</a> :: (a -> k -> b -> (a, c)) -> a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> (a, <a href="Data-HashMap.html#t:Map">Map</a> k c)<a href="src/Data-HashMap.html#mapAccumWithKey" class="link">Source</a></p><div class="doc"><p>The function <code><code><a href="Data-HashMap.html#v:mapAccumWithKey">mapAccumWithKey</a></code></code> threads an accumulating argument through
the map in unspecified order of keys.
</p></div></div><h2 id="g:12">Fold
</h2><div class="top"><p class="src"><a name="v:fold" class="def">fold</a> :: (a -> b -> b) -> b -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> b<a href="src/Data-HashMap.html#fold" class="link">Source</a></p><div class="doc"><p>Fold the values in the map, such that <code><code><a href="Data-HashMap.html#v:fold">fold</a></code> f z == <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-List.html#v:foldr">foldr</a></code>
f z . <code><a href="Data-HashMap.html#v:elems">elems</a></code></code>.
</p></div></div><div class="top"><p class="src"><a name="v:foldWithKey" class="def">foldWithKey</a> :: (k -> a -> b -> b) -> b -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> b<a href="src/Data-HashMap.html#foldWithKey" class="link">Source</a></p><div class="doc"><p>Fold the keys and values in the map, such that <code><code><a href="Data-HashMap.html#v:foldWithKey">foldWithKey</a></code> f z ==
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-List.html#v:foldr">foldr</a></code> (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Tuple.html#v:uncurry">uncurry</a></code> f) z . <code>toAscList</code></code>.
</p></div></div><h1 id="g:13">Conversion
</h1><div class="top"><p class="src"><a name="v:elems" class="def">elems</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [a]<a href="src/Data-HashMap.html#elems" class="link">Source</a></p><div class="doc"><p>Return all elements of the map in arbitrary order of their keys.
</p></div></div><div class="top"><p class="src"><a name="v:keys" class="def">keys</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [k]<a href="src/Data-HashMap.html#keys" class="link">Source</a></p><div class="doc"><p>Return all keys of the map in arbitrary order.
</p></div></div><div class="top"><p class="src"><a name="v:keysSet" class="def">keysSet</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Set.html#t:Set">Set</a> k<a href="src/Data-HashMap.html#keysSet" class="link">Source</a></p><div class="doc"><p>The set of all keys of the map.
</p></div></div><div class="top"><p class="src"><a name="v:assocs" class="def">assocs</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [(k, a)]<a href="src/Data-HashMap.html#assocs" class="link">Source</a></p><div class="doc"><p>Return all key/value pairs in the map in arbitrary key order.
</p></div></div><h2 id="g:14">Lists
</h2><div class="top"><p class="src"><a name="v:toList" class="def">toList</a> :: <a href="Data-HashMap.html#t:Map">Map</a> k a -> [(k, a)]<a href="src/Data-HashMap.html#toList" class="link">Source</a></p><div class="doc"><p>Convert the map to a list of key/value pairs.
</p></div></div><div class="top"><p class="src"><a name="v:fromList" class="def">fromList</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => [(k, a)] -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#fromList" class="link">Source</a></p><div class="doc"><p>Create a map from a list of key/value pairs.
</p></div></div><div class="top"><p class="src"><a name="v:fromListWith" class="def">fromListWith</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (a -> a -> a) -> [(k, a)] -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#fromListWith" class="link">Source</a></p><div class="doc"><p>Create a map from a list of key/value pairs with a combining function.
</p></div></div><div class="top"><p class="src"><a name="v:fromListWithKey" class="def">fromListWithKey</a> :: (<a href="/usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k) => (k -> a -> a -> a) -> [(k, a)] -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#fromListWithKey" class="link">Source</a></p><div class="doc"><p>Build a map from a list of key/value pairs with a combining function.
</p></div></div><h1 id="g:15">Filter
</h1><div class="top"><p class="src"><a name="v:filter" class="def">filter</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#filter" class="link">Source</a></p><div class="doc"><p>Filter all values that satisfy some predicate.
</p></div></div><div class="top"><p class="src"><a name="v:filterWithKey" class="def">filterWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a<a href="src/Data-HashMap.html#filterWithKey" class="link">Source</a></p><div class="doc"><p>Filter all keys/values that satisfy some predicate.
</p></div></div><div class="top"><p class="src"><a name="v:partition" class="def">partition</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k a, <a href="Data-HashMap.html#t:Map">Map</a> k a)<a href="src/Data-HashMap.html#partition" class="link">Source</a></p><div class="doc"><p>Partition the map according to some predicate. The first map contains all
elements that satisfy the predicate, the second all elements that fail the
predicate.
</p></div></div><div class="top"><p class="src"><a name="v:partitionWithKey" class="def">partitionWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k a, <a href="Data-HashMap.html#t:Map">Map</a> k a)<a href="src/Data-HashMap.html#partitionWithKey" class="link">Source</a></p><div class="doc"><p>Partition the map according to some predicate. The first map contains all
elements that satisfy the predicate, the second all elements that fail the
predicate.
</p></div></div><div class="top"><p class="src"><a name="v:mapMaybe" class="def">mapMaybe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b<a href="src/Data-HashMap.html#mapMaybe" class="link">Source</a></p><div class="doc"><p>Map values and collect the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code> results.
</p></div></div><div class="top"><p class="src"><a name="v:mapMaybeWithKey" class="def">mapMaybeWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> b) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b<a href="src/Data-HashMap.html#mapMaybeWithKey" class="link">Source</a></p><div class="doc"><p>Map keys/values and collect the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code> results.
</p></div></div><div class="top"><p class="src"><a name="v:mapEither" class="def">mapEither</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> b c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k b, <a href="Data-HashMap.html#t:Map">Map</a> k c)<a href="src/Data-HashMap.html#mapEither" class="link">Source</a></p><div class="doc"><p>Map values and separate the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:Left">Left</a></code> and <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:Right">Right</a></code> results.
</p></div></div><div class="top"><p class="src"><a name="v:mapEitherWithKey" class="def">mapEitherWithKey</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (k -> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> b c) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> (<a href="Data-HashMap.html#t:Map">Map</a> k b, <a href="Data-HashMap.html#t:Map">Map</a> k c)<a href="src/Data-HashMap.html#mapEitherWithKey" class="link">Source</a></p><div class="doc"><p>Map keys/values and separate the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:Left">Left</a></code> and <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:Right">Right</a></code> results.
</p></div></div><h1 id="g:16">Submap
</h1><div class="top"><p class="src"><a name="v:isSubmapOf" class="def">isSubmapOf</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a) => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#isSubmapOf" class="link">Source</a></p><div class="doc"><p>Is this a submap?
</p></div></div><div class="top"><p class="src"><a name="v:isSubmapOfBy" class="def">isSubmapOfBy</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#isSubmapOfBy" class="link">Source</a></p><div class="doc"><p>The expression (<code><code><a href="Data-HashMap.html#v:isSubmapOfBy">isSubmapOfBy</a></code> f m1 m2</code>) returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#v:True">True</a></code> if all keys in
<code>m1</code> are in <code>m2</code>, and when <code>f</code> returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#v:True">True</a></code> when applied to their
respective values.
</p></div></div><div class="top"><p class="src"><a name="v:isProperSubmapOf" class="def">isProperSubmapOf</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a) => <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#isProperSubmapOf" class="link">Source</a></p><div class="doc"><p>Is this a proper submap? (ie. a submap but not equal).
</p></div></div><div class="top"><p class="src"><a name="v:isProperSubmapOfBy" class="def">isProperSubmapOfBy</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> k => (a -> b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-HashMap.html#t:Map">Map</a> k a -> <a href="Data-HashMap.html#t:Map">Map</a> k b -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-HashMap.html#isProperSubmapOfBy" class="link">Source</a></p><div class="doc"><p>Is this a proper submap? (ie. a submap but not equal). The expression
(<code><code><a href="Data-HashMap.html#v:isProperSubmapOfBy">isProperSubmapOfBy</a></code> f m1 m2</code>) returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#v:True">True</a></code> when <code>m1</code> and <code>m2</code> are not
equal, all keys in <code>m1</code> are in <code>m2</code>, and when <code>f</code> returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#v:True">True</a></code> when
applied to their respective values.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|