-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.utils.map.html
38 lines (38 loc) · 36.4 KB
/
io.randomseed.utils.map.html
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
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.map documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">1.2.34</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-4 branch current"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.map.html#var-assoc-existing"><div class="inner"><span>assoc-existing</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-assoc-if"><div class="inner"><span>assoc-if</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-assoc-if-key"><div class="inner"><span>assoc-if-key</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-assoc-if-not"><div class="inner"><span>assoc-if-not</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-assoc-if-not-key"><div class="inner"><span>assoc-if-not-key</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-assoc-missing"><div class="inner"><span>assoc-missing</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-dissoc-if"><div class="inner"><span>dissoc-if</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-dissoc-in"><div class="inner"><span>dissoc-in</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-duplicate-keys"><div class="inner"><span>duplicate-keys</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-invert-in-sets"><div class="inner"><span>invert-in-sets</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-lazy"><div class="inner"><span>lazy</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-lazy-get"><div class="inner"><span>lazy-get</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-lazy.3F"><div class="inner"><span>lazy?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-keys"><div class="inner"><span>map-keys</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-keys-and-vals"><div class="inner"><span>map-keys-and-vals</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-keys-by-v"><div class="inner"><span>map-keys-by-v</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-of-sets-invert"><div class="inner"><span>map-of-sets-invert</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-of-vectors-invert-flatten"><div class="inner"><span>map-of-vectors-invert-flatten</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-vals"><div class="inner"><span>map-vals</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-vals-by-k"><div class="inner"><span>map-vals-by-k</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-vals-by-kv"><div class="inner"><span>map-vals-by-kv</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-values"><div class="inner"><span>map-values</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-values-with-path"><div class="inner"><span>map-values-with-path</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-map-values-with-rpath"><div class="inner"><span>map-values-with-rpath</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-merge-lazy"><div class="inner"><span>merge-lazy</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-nil-existing-keys"><div class="inner"><span>nil-existing-keys</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-nil-keys"><div class="inner"><span>nil-keys</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-or-map"><div class="inner"><span>or-map</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-qassoc"><div class="inner"><span>qassoc</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-qupdate"><div class="inner"><span>qupdate</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-remove-empty-values"><div class="inner"><span>remove-empty-values</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-remove-except"><div class="inner"><span>remove-except</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-remove-if-value"><div class="inner"><span>remove-if-value</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-remove-if-value-in"><div class="inner"><span>remove-if-value-in</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-remove-if-value-not-in"><div class="inner"><span>remove-if-value-not-in</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-select-keys-lazy"><div class="inner"><span>select-keys-lazy</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-to-lazy"><div class="inner"><span>to-lazy</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-bytes-to-strings"><div class="inner"><span>update-bytes-to-strings</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-existing"><div class="inner"><span>update-existing</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-if"><div class="inner"><span>update-if</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-if-not"><div class="inner"><span>update-if-not</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-missing"><div class="inner"><span>update-missing</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-to-bytes"><div class="inner"><span>update-to-bytes</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-values"><div class="inner"><span>update-values</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-values-or-seqs"><div class="inner"><span>update-values-or-seqs</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-values-or-seqs-recur"><div class="inner"><span>update-values-or-seqs-recur</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.map.html#var-update-values-recur"><div class="inner"><span>update-values-recur</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.map</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>Random utils, map utilities.</p>
</div></div><div class="public anchor" id="var-assoc-existing"><h3>assoc-existing</h3><div class="usage"><code>(assoc-existing)</code><code>(assoc-existing coll)</code><code>(assoc-existing coll k val)</code><code>(assoc-existing coll k val & more)</code></div><div class="doc"><div class="markdown"><p>Associates keys and values only if the keys exist in a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L154">view source</a></div></div><div class="public anchor" id="var-assoc-if"><h3>assoc-if</h3><h4 class="type">macro</h4><div class="usage"><code>(assoc-if coll pred k val)</code><code>(assoc-if coll pred k val & pairs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L240">view source</a></div></div><div class="public anchor" id="var-assoc-if-key"><h3>assoc-if-key</h3><h4 class="type">macro</h4><div class="usage"><code>(assoc-if-key coll k pred val)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L264">view source</a></div></div><div class="public anchor" id="var-assoc-if-not"><h3>assoc-if-not</h3><h4 class="type">macro</h4><div class="usage"><code>(assoc-if-not coll pred k val)</code><code>(assoc-if-not coll pred k val & pairs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L252">view source</a></div></div><div class="public anchor" id="var-assoc-if-not-key"><h3>assoc-if-not-key</h3><h4 class="type">macro</h4><div class="usage"><code>(assoc-if-not-key coll k pred val)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L272">view source</a></div></div><div class="public anchor" id="var-assoc-missing"><h3>assoc-missing</h3><div class="usage"><code>(assoc-missing)</code><code>(assoc-missing coll)</code><code>(assoc-missing coll k val)</code><code>(assoc-missing coll k val & more)</code></div><div class="doc"><div class="markdown"><p>Associates keys and values only if the keys do not yet exist in a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L143">view source</a></div></div><div class="public anchor" id="var-dissoc-if"><h3>dissoc-if</h3><div class="usage"><code>(dissoc-if m k pred)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L280">view source</a></div></div><div class="public anchor" id="var-dissoc-in"><h3>dissoc-in</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(dissoc-in m [k & ks :as keys])</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.core/assoc-in</code> but removes entries. Leaves empty maps.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L634">view source</a></div></div><div class="public anchor" id="var-duplicate-keys"><h3>duplicate-keys</h3><div class="usage"><code>(duplicate-keys map kmap)</code></div><div class="doc"><div class="markdown"><p>Returns a map <code>map</code> with the keys present in <code>kmap</code> duplicated under new names according to the values in <code>kmap</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L644">view source</a></div></div><div class="public anchor" id="var-invert-in-sets"><h3>invert-in-sets</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(invert-in-sets m)</code><code>(invert-in-sets m dst)</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.set/map-invert</code> but preserves all possible values in sets.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L451">view source</a></div></div><div class="public anchor" id="var-lazy"><h3>lazy</h3><h4 class="type">macro</h4><div class="usage"><code>(lazy)</code><code>(lazy m)</code></div><div class="doc"><div class="markdown"><p>Creates a lazy map from a literal map. All values are unrealized.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L671">view source</a></div></div><div class="public anchor" id="var-lazy-get"><h3>lazy-get</h3><h4 class="type">macro</h4><div class="usage"><code>(lazy-get m k exp)</code></div><div class="doc"><div class="markdown"><p>Like get but the default value is an expression that is going to be evaluated only if the associative structure does not contain the given key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L16">view source</a></div></div><div class="public anchor" id="var-lazy.3F"><h3>lazy?</h3><div class="usage"><code>(lazy? m)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the given argument is a lazy map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L685">view source</a></div></div><div class="public anchor" id="var-map-keys"><h3>map-keys</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-keys f m)</code><code>(map-keys f m dst)</code></div><div class="doc"><div class="markdown"><p>For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with keys updated by results returned by the function. When the third argument is given then it should be a map on which operations are performed instead of using an empty map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L397">view source</a></div></div><div class="public anchor" id="var-map-keys-and-vals"><h3>map-keys-and-vals</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-keys-and-vals f m)</code><code>(map-keys-and-vals f m dst)</code></div><div class="doc"><div class="markdown"><p>For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with keys updated by results returned by the function and values also updated by results of the same function. The function should return a sequential collection of 2 elements: first containing a new value of a key and second containing a new value of a transformed value associated with that key. When the third argument is given then it should be a map on which operations are performed instead of using an empty map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L416">view source</a></div></div><div class="public anchor" id="var-map-keys-by-v"><h3>map-keys-by-v</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-keys-by-v f m)</code><code>(map-keys-by-v f m dst)</code></div><div class="doc"><div class="markdown"><p>For each key and value of the given map m calls a function passed as the first argument (passing successive values during calls to it) and generates a map with keys updated by results returned by the function. When the third argument is given then it should be a map on which operations are performed instead of using and empty map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L378">view source</a></div></div><div class="public anchor" id="var-map-of-sets-invert"><h3>map-of-sets-invert</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-of-sets-invert m)</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.set/map-invert</code> but for map of sets (as values) to preserve all possible values (as keys of newly created map).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L439">view source</a></div></div><div class="public anchor" id="var-map-of-vectors-invert-flatten"><h3>map-of-vectors-invert-flatten</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-of-vectors-invert-flatten m)</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.set/map-invert</code> but for map of vectors (as values). Duplicated keys are replaced.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L462">view source</a></div></div><div class="public anchor" id="var-map-vals"><h3>map-vals</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-vals f m)</code><code>(map-vals f m dst)</code></div><div class="doc"><div class="markdown"><p>For each key and value of the given map m calls a function passed as the first argument (passing successive values during calls to it) and generates a map with values updated by results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L358">view source</a></div></div><div class="public anchor" id="var-map-vals-by-k"><h3>map-vals-by-k</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-vals-by-k f m)</code><code>(map-vals-by-k f m dst)</code></div><div class="doc"><div class="markdown"><p>For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with values updated by results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L318">view source</a></div></div><div class="public anchor" id="var-map-vals-by-kv"><h3>map-vals-by-kv</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-vals-by-kv f m)</code><code>(map-vals-by-kv f m dst)</code></div><div class="doc"><div class="markdown"><p>For each key and value of the given map m calls a function passed as the first argument (passing successive keys and values during calls to it) and generates a map with values updated by results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L338">view source</a></div></div><div class="public anchor" id="var-map-values"><h3>map-values</h3><div class="usage"><code>(map-values f coll)</code></div><div class="doc"><div class="markdown"><p>Recursively transforms values of a map coll using function f. The function should take a value and return new value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L472">view source</a></div></div><div class="public anchor" id="var-map-values-with-path"><h3>map-values-with-path</h3><div class="usage"><code>(map-values-with-path f coll)</code></div><div class="doc"><div class="markdown"><p>Recursively transforms values of a map coll using function f. The function should take a value and a sequence of visited keys (stored in a vector), and return a new value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L500">view source</a></div></div><div class="public anchor" id="var-map-values-with-rpath"><h3>map-values-with-rpath</h3><div class="usage"><code>(map-values-with-rpath f coll)</code></div><div class="doc"><div class="markdown"><p>Recursively transforms values of a map coll using function f. The function should take a value and a sequence of visited keys in reverse order (stored in a persistent list), and return a new value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L493">view source</a></div></div><div class="public anchor" id="var-merge-lazy"><h3>merge-lazy</h3><div class="usage"><code>(merge-lazy m1 m2)</code></div><div class="doc"><div class="markdown"><p>Merges two lazy maps.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L704">view source</a></div></div><div class="public anchor" id="var-nil-existing-keys"><h3>nil-existing-keys</h3><div class="usage"><code>(nil-existing-keys m keys)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L664">view source</a></div></div><div class="public anchor" id="var-nil-keys"><h3>nil-keys</h3><div class="usage"><code>(nil-keys m keys)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L657">view source</a></div></div><div class="public anchor" id="var-or-map"><h3>or-map</h3><div class="usage"><code>(or-map m)</code></div><div class="doc"><div class="markdown"><p>Returns an empty map if the argument is <code>nil</code>. Otherwise returns its argument.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L23">view source</a></div></div><div class="public anchor" id="var-qassoc"><h3>qassoc</h3><div class="usage"><code>(qassoc mp a b)</code><code>(qassoc mp a b c d)</code><code>(qassoc mp a b c d e f)</code><code>(qassoc mp a b c d e f g h)</code><code>(qassoc mp a b c d e f g h i j)</code><code>(qassoc mp a b c d e f g h i j k l)</code><code>(qassoc mp a b c d e f g h i j k l m n)</code><code>(qassoc mp a b c d e f g h i j k l m n o p)</code><code>(qassoc mp a b c d e f g h i j k l m n o p q r)</code><code>(qassoc mp a b c d e f g h i j k l m n o p q r & pairs)</code></div><div class="doc"><div class="markdown"><p>Faster version of <code>assoc</code> with some of the checks and conversions disabled. Associates key <code>a</code> with value <code>b</code> in <code>mp</code>. If <code>mp</code> is <code>nil</code> it creates a new map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L32">view source</a></div></div><div class="public anchor" id="var-qupdate"><h3>qupdate</h3><div class="usage"><code>(qupdate m k f)</code><code>(qupdate m k f x)</code><code>(qupdate m k f x y)</code><code>(qupdate m k f x y z)</code><code>(qupdate m k f x y z c)</code><code>(qupdate m k f x y z c v)</code><code>(qupdate m k f x y z c v a)</code><code>(qupdate m k f x y z c v a b)</code><code>(qupdate m k f x y z c v a b & more)</code></div><div class="doc"><div class="markdown"><p>Similar to <code>clojure.core/update</code>, updates a value in an associative structure, where <code>k</code> is a key and <code>f</code> is a function which will take the old value and any supplied args and return the new value, and returns a new structure. Uses <code>qassoc</code> instead of <code>clojure.core/assoc</code> internally.</p>
<p>If the key does not exist, <code>nil</code> is passed as the old value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L117">view source</a></div></div><div class="public anchor" id="var-remove-empty-values"><h3>remove-empty-values</h3><div class="usage"><code>(remove-empty-values m)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L313">view source</a></div></div><div class="public anchor" id="var-remove-except"><h3>remove-except</h3><div class="usage"><code>(remove-except m keyseq)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L309">view source</a></div></div><div class="public anchor" id="var-remove-if-value"><h3>remove-if-value</h3><div class="usage"><code>(remove-if-value m pred)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L285">view source</a></div></div><div class="public anchor" id="var-remove-if-value-in"><h3>remove-if-value-in</h3><div class="usage"><code>(remove-if-value-in m vals)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L294">view source</a></div></div><div class="public anchor" id="var-remove-if-value-not-in"><h3>remove-if-value-not-in</h3><div class="usage"><code>(remove-if-value-not-in m vals)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L301">view source</a></div></div><div class="public anchor" id="var-select-keys-lazy"><h3>select-keys-lazy</h3><div class="usage"><code>(select-keys-lazy m keyseq)</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.core/select-keys</code> but preserves unrealized values as they are.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L690">view source</a></div></div><div class="public anchor" id="var-to-lazy"><h3>to-lazy</h3><div class="usage"><code>(to-lazy)</code><code>(to-lazy m)</code></div><div class="doc"><div class="markdown"><p>Converts the given map to a lazy map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L678">view source</a></div></div><div class="public anchor" id="var-update-bytes-to-strings"><h3>update-bytes-to-strings</h3><div class="usage"><code>(update-bytes-to-strings coll k)</code><code>(update-bytes-to-strings coll k & keys)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L234">view source</a></div></div><div class="public anchor" id="var-update-existing"><h3>update-existing</h3><div class="usage"><code>(update-existing coll k fun)</code><code>(update-existing coll k fun & more)</code></div><div class="doc"><div class="markdown"><p>Updates the given key <code>k</code> of <code>coll</code> by calling a function <code>fun</code> and passing optional arguments specified as additional arguments. Will not perform any update if the given key does not exist within the collection. Returns updated collection.</p>
<p>If <code>fun</code> is not a function it will be made one by using <code>constantly</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L165">view source</a></div></div><div class="public anchor" id="var-update-if"><h3>update-if</h3><div class="usage"><code>(update-if coll k pred fun)</code><code>(update-if coll k pred fun & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L196">view source</a></div></div><div class="public anchor" id="var-update-if-not"><h3>update-if-not</h3><div class="usage"><code>(update-if-not coll k pred fun)</code><code>(update-if-not coll k pred fun & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L212">view source</a></div></div><div class="public anchor" id="var-update-missing"><h3>update-missing</h3><div class="usage"><code>(update-missing coll k fun)</code><code>(update-missing coll k fun & more)</code></div><div class="doc"><div class="markdown"><p>Updates the given key <code>k</code> of <code>coll</code> by calling a function <code>fun</code> and passing optional arguments specified as additional arguments. Will not perform any update if the given key exists within the collection, therefore the function will always receive <code>nil</code> as its argument. Returns updated collection.</p>
<p>If <code>fun</code> is not a function it will be made one by using <code>constantly</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L180">view source</a></div></div><div class="public anchor" id="var-update-to-bytes"><h3>update-to-bytes</h3><div class="usage"><code>(update-to-bytes coll k)</code><code>(update-to-bytes coll k & keys)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L228">view source</a></div></div><div class="public anchor" id="var-update-values"><h3>update-values</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(update-values map vmap)</code><code>(update-values map vmap create-keys?)</code><code>(update-values map vmap create-keys? remove-key-mark)</code></div><div class="doc"><div class="markdown"><p>Returns the map with its values identified with keys from vmap updated with the associated functions from vmap.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L507">view source</a></div></div><div class="public anchor" id="var-update-values-or-seqs"><h3>update-values-or-seqs</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(update-values-or-seqs map vmap)</code><code>(update-values-or-seqs map vmap create-keys?)</code></div><div class="doc"><div class="markdown"><p>Returns the map with its values identified with keys from <code>vmap</code> updated with the associated functions from <code>vmap</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L585">view source</a></div></div><div class="public anchor" id="var-update-values-or-seqs-recur"><h3>update-values-or-seqs-recur</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(update-values-or-seqs-recur map vmap)</code><code>(update-values-or-seqs-recur map vmap create-keys?)</code></div><div class="doc"><div class="markdown"><p>Returns the map with its values identified with keys from <code>vmap</code> recursively updated with the associated functions from <code>vmap</code>. Shape is not reflected, second map (<code>vmap</code>) should be flat, searching for keys is recursive, including nested vectors.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L605">view source</a></div></div><div class="public anchor" id="var-update-values-recur"><h3>update-values-recur</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(update-values-recur map vmap)</code><code>(update-values-recur map vmap create-keys?)</code></div><div class="doc"><div class="markdown"><p>Returns the map with its values identified with keys from vmap recursively updated with the associated functions from vmap. Shape is not reflected, second map (vmap) should be flat, searching for keys is recursive, including nested vectors.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/map.clj#L552">view source</a></div></div></div></body></html>