-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.bankster.util.map.html
21 lines (21 loc) · 22.9 KB
/
io.randomseed.bankster.util.map.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.bankster.util.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">Bankster</span> <span class="project-version">1.2.16</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><li class="depth-1 "><a href="20_data_structures.html"><div class="inner"><span>Data Structures</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.bankster.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bankster</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.bankster.config.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>config</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.bankster.currency.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>currency</span></div></a></li><li class="depth-4"><a href="io.randomseed.bankster.money.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>money</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.bankster.money.inter-ops.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inter-ops</span></div></a></li><li class="depth-5"><a href="io.randomseed.bankster.money.ops.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ops</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.bankster.registry.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>registry</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.bankster.scale.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scale</span></div></a></li><li class="depth-4"><a href="io.randomseed.bankster.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.bankster.util.fs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.bankster.util.importer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>importer</span></div></a></li><li class="depth-5 current"><a href="io.randomseed.bankster.util.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</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.bankster.util.map.html#var-assoc-if"><div class="inner"><span>assoc-if</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.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.bankster.util.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.bankster.util.map.html#var-dissoc-in"><div class="inner"><span>dissoc-in</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.map.html#var-lazy-get"><div class="inner"><span>lazy-get</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.map.html#var-map-keys"><div class="inner"><span>map-keys</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.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.bankster.util.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.bankster.util.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.bankster.util.map.html#var-map-vals"><div class="inner"><span>map-vals</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.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.bankster.util.map.html#var-map-values"><div class="inner"><span>map-values</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.map.html#var-remove-by-if-value-in"><div class="inner"><span>remove-by-if-value-in</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.map.html#var-remove-except"><div class="inner"><span>remove-except</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.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.bankster.util.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.bankster.util.map.html#var-remove-keys-ns"><div class="inner"><span>remove-keys-ns</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.map.html#var-update-existing"><div class="inner"><span>update-existing</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.map.html#var-update-missing"><div class="inner"><span>update-missing</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.map.html#var-update-values"><div class="inner"><span>update-values</span></div></a></li><li class="depth-1"><a href="io.randomseed.bankster.util.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.bankster.util.map</h1><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-assoc-if"><h3>assoc-if</h3><h4 class="type">macro</h4><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(assoc-if coll pred k val)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L31">view source</a></div></div><div class="public anchor" id="var-assoc-if-key"><h3>assoc-if-key</h3><h4 class="type">macro</h4><h4 class="added">added in 1.0.0</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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L41">view source</a></div></div><div class="public anchor" id="var-assoc-if-not"><h3>assoc-if-not</h3><h4 class="type">macro</h4><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(assoc-if-not coll pred k val)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L36">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><h4 class="added">added in 1.0.0</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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L47">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 assoc-in but removes entries. Leaves empty maps.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L291">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L221">view source</a></div></div><div class="public anchor" id="var-lazy-get"><h3>lazy-get</h3><h4 class="type">macro</h4><h4 class="added">added in 1.0.0</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 not evaluated if the key is found.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L5">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L173">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L190">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L156">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L211">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L232">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L138">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L102">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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L120">view source</a></div></div><div class="public anchor" id="var-map-values"><h3>map-values</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(map-values f coll)</code></div><div class="doc"><div class="markdown"><p>Recursively transforms values of a 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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L242">view source</a></div></div><div class="public anchor" id="var-remove-by-if-value-in"><h3>remove-by-if-value-in</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(remove-by-if-value-in m pred only)</code></div><div class="doc"><div class="markdown"><p>Removes map entries if the given predicate returns true and value is in the given set.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L80">view source</a></div></div><div class="public anchor" id="var-remove-empty-values"><h3>remove-empty-values</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(remove-empty-values m)</code><code>(remove-empty-values m only)</code></div><div class="doc"><div class="markdown"><p>Removes entries with empty values from a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L89">view source</a></div></div><div class="public anchor" id="var-remove-except"><h3>remove-except</h3><h4 class="added">added in 1.0.0</h4><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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L75">view source</a></div></div><div class="public anchor" id="var-remove-if-value"><h3>remove-if-value</h3><h4 class="added">added in 1.0.0</h4><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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L53">view source</a></div></div><div class="public anchor" id="var-remove-if-value-in"><h3>remove-if-value-in</h3><h4 class="added">added in 1.0.0</h4><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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L62">view source</a></div></div><div class="public anchor" id="var-remove-if-value-not-in"><h3>remove-if-value-not-in</h3><h4 class="added">added in 1.0.0</h4><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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L68">view source</a></div></div><div class="public anchor" id="var-remove-keys-ns"><h3>remove-keys-ns</h3><h4 class="added">added in 1.0.2</h4><div class="usage"><code>(remove-keys-ns m)</code></div><div class="doc"><div class="markdown"><p>Removes namespace component from qualified keys (keywords and symbols). Non-qualified identifiers and other data types are not renamed.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L301">view source</a></div></div><div class="public anchor" id="var-update-existing"><h3>update-existing</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(update-existing coll k fun & more)</code></div><div class="doc"><div class="markdown"><p>Updates the key k of the given collection coll by calling a function fun and passing optional arguments specified as additional arguments. Will not perform any update if the given key does not exist within the collection. Returns a collection.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L12">view source</a></div></div><div class="public anchor" id="var-update-missing"><h3>update-missing</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(update-missing coll k fun & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L23">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></div><div class="doc"><div class="markdown"><p>Returns the given 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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L251">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 given 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/bankster/blob/1.2.16/src/io/randomseed/bankster/util/map.clj#L271">view source</a></div></div></div></body></html>