<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tools (libabsolute.Tools)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">libabsolute</a> &#x00BB; Tools</nav><h1>Module <code>Tools</code></h1><p>A small set of useful utilities</p><nav class="toc"><ul><li><a href="#printing-stuff">Printing stuff</a></li></ul></nav></header><section><header><h2 id="printing-stuff"><a href="#printing-stuff" class="anchor"></a>Printing stuff</h2></header><dl><dt class="spec value" id="val-fail_fmt"><a href="#val-fail_fmt" class="anchor"></a><code><span class="keyword">val</span> fail_fmt : <span><span>(<span class="type-var">'a</span>, Stdlib.Format.formatter, unit, <span class="type-var">'b</span>)</span> Stdlib.format4</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>same as failwith but uses a format instead</p></dd></dl><dl><dt class="spec value" id="val-inplace_print"><a href="#val-inplace_print" class="anchor"></a><code><span class="keyword">val</span> inplace_print : unit <span>&#45;&gt;</span> Stdlib.Format.formatter <span>&#45;&gt;</span> string <span>&#45;&gt;</span> unit</code></dt><dd><p>printing that erases previous output. should not be intertwined with orher prints</p></dd></dl><dl><dt class="spec value" id="val-matrix_print_indent"><a href="#val-matrix_print_indent" class="anchor"></a><code><span class="keyword">val</span> matrix_print_indent : Stdlib.Format.formatter <span>&#45;&gt;</span> <span><span>string array</span> array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>2D table print indentation</p></dd></dl><dl><dt class="spec value" id="val-semi_colon_sep"><a href="#val-semi_colon_sep" class="anchor"></a><code><span class="keyword">val</span> semi_colon_sep : Stdlib.Format.formatter <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> unit</code></dt><dd><p>semi_colon separator</p></dd></dl><dl><dt class="spec value" id="val-comma_sep"><a href="#val-comma_sep" class="anchor"></a><code><span class="keyword">val</span> comma_sep : Stdlib.Format.formatter <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> unit</code></dt><dd><p>comma separator</p></dd></dl><dl><dt class="spec value" id="val-newline_sep"><a href="#val-newline_sep" class="anchor"></a><code><span class="keyword">val</span> newline_sep : Stdlib.Format.formatter <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> unit</code></dt><dd><p>newline separator</p></dd></dl><dl><dt class="spec value" id="val-swap_pair"><a href="#val-swap_pair" class="anchor"></a><code><span class="keyword">val</span> swap_pair : <span>(<span class="type-var">'a</span> * <span class="type-var">'b</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> * <span class="type-var">'a</span></code></dt><dd><p>misc</p></dd></dl><dl><dt class="spec value" id="val-fold_on_combination_2"><a href="#val-fold_on_combination_2" class="anchor"></a><code><span class="keyword">val</span> fold_on_combination_2 : <span>?&#8288;duplicate:bool</span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>folder on all possible combinations of size 2 of an array</p></dd></dl><dl><dt class="spec value" id="val-meet_bot"><a href="#val-meet_bot" class="anchor"></a><code><span class="keyword">val</span> meet_bot : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> option</span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> option</span></code></dt><dd><p>meet on options</p></dd></dl><dl><dt class="spec value" id="val-merge_bot"><a href="#val-merge_bot" class="anchor"></a><code><span class="keyword">val</span> merge_bot : <span><span class="type-var">'a</span> option</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> option</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span> * <span class="type-var">'b</span>)</span> option</span></code></dt><dd><p>merge on options</p></dd></dl><dl><dt class="spec value" id="val-join_bot2"><a href="#val-join_bot2" class="anchor"></a><code><span class="keyword">val</span> join_bot2 : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span></code></dt><dd><p>join on options</p></dd></dl><dl><dt class="spec module" id="module-VarMap"><a href="#module-VarMap" class="anchor"></a><code><span class="keyword">module</span> <a href="VarMap/index.html">VarMap</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>only one instanciation forall variable maps modules</p></dd></dl><div class="spec module" id="module-VarSet"><a href="#module-VarSet" class="anchor"></a><code><span class="keyword">module</span> <a href="VarSet/index.html">VarSet</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div></section></div></body></html>