|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IContainer (infer.IStdlib.IContainer)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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">infer</a> » <a href="../index.html">IStdlib</a> » IContainer</nav><h1>Module <code>IStdlib.IContainer</code></h1></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><code><span class="keyword">module</span> F = Stdlib.Format</code></div><aside><p>Extension of <span class="xref-unresolved" title="unresolved reference to "Base.Container""><code>Base</code>.Container</span>, i.e. generic definitions of container operations in terms of a <code>fold</code> function.</p></aside><dl><dt class="spec type" id="type-singleton_or_more"><a href="#type-singleton_or_more" class="anchor"></a><code><span class="keyword">type</span> <span>'a singleton_or_more</span></code><code> = </code><table class="variant"><tr id="type-singleton_or_more.Empty" class="anchored"><td class="def constructor"><a href="#type-singleton_or_more.Empty" class="anchor"></a><code>| </code><code><span class="constructor">Empty</span></code></td></tr><tr id="type-singleton_or_more.Singleton" class="anchored"><td class="def constructor"><a href="#type-singleton_or_more.Singleton" class="anchor"></a><code>| </code><code><span class="constructor">Singleton</span> <span class="keyword">of</span> <span class="type-var">'a</span></code></td></tr><tr id="type-singleton_or_more.More" class="anchored"><td class="def constructor"><a href="#type-singleton_or_more.More" class="anchor"></a><code>| </code><code><span class="constructor">More</span></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-singleton_or_more"><a href="#val-singleton_or_more" class="anchor"></a><code><span class="keyword">val</span> singleton_or_more : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'a</span> <a href="index.html#type-singleton_or_more">singleton_or_more</a></span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span><span class="type-var">'a</span> <a href="index.html#type-singleton_or_more">singleton_or_more</a></span></code></dt><dt class="spec value" id="val-mem_nth"><a href="#val-mem_nth" class="anchor"></a><code><span class="keyword">val</span> mem_nth : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">_</span>, int)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> int <span>-></span> bool</code></dt><dt class="spec value" id="val-forto"><a href="#val-forto" class="anchor"></a><code><span class="keyword">val</span> forto : <span><span>(int, int, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></code></dt><dt class="spec value" id="val-forto_right"><a href="#val-forto_right" class="anchor"></a><code><span class="keyword">val</span> forto_right : <span><span>(int, int, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></code></dt><dt class="spec value" id="val-to_rev_list"><a href="#val-to_rev_list" class="anchor"></a><code><span class="keyword">val</span> to_rev_list : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'a</span> list</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span><span class="type-var">'a</span> list</span></code></dt><dt class="spec value" id="val-rev_filter_to_list"><a href="#val-rev_filter_to_list" class="anchor"></a><code><span class="keyword">val</span> rev_filter_to_list : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'a</span> list</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span>f:<span>(<span class="type-var">'a</span> <span>-></span> bool)</span></span> <span>-></span> <span><span class="type-var">'a</span> list</span></code></dt><dt class="spec value" id="val-rev_map_to_list"><a href="#val-rev_map_to_list" class="anchor"></a><code><span class="keyword">val</span> rev_map_to_list : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'b</span> list</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span>f:<span>(<span class="type-var">'a</span> <span>-></span> <span class="type-var">'b</span>)</span></span> <span>-></span> <span><span class="type-var">'b</span> list</span></code></dt><dt class="spec value" id="val-rev_filter_map_to_list"><a href="#val-rev_filter_map_to_list" class="anchor"></a><code><span class="keyword">val</span> rev_filter_map_to_list : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'b</span> list</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span>f:<span>(<span class="type-var">'a</span> <span>-></span> <span><span class="type-var">'b</span> option</span>)</span></span> <span>-></span> <span><span class="type-var">'b</span> list</span></code></dt><dt class="spec value" id="val-iter_consecutive"><a href="#val-iter_consecutive" class="anchor"></a><code><span class="keyword">val</span> iter_consecutive : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'a</span> option</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span>f:<span>(<span class="type-var">'a</span> <span>-></span> <span class="type-var">'a</span> <span>-></span> unit)</span></span> <span>-></span> unit</code></dt><dt class="spec value" id="val-pp_collection"><a href="#val-pp_collection" class="anchor"></a><code><span class="keyword">val</span> pp_collection : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span><span class="type-var">'a</span> option</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span>pp_item:<span>(<a href="index.html#module-F">F</a>.formatter <span>-></span> <span class="type-var">'a</span> <span>-></span> unit)</span></span> <span>-></span> <a href="index.html#module-F">F</a>.formatter <span>-></span> <span class="type-var">'t</span> <span>-></span> unit</code></dt><dt class="spec value" id="val-filter"><a href="#val-filter" class="anchor"></a><code><span class="keyword">val</span> filter : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span>filter:<span>(<span class="type-var">'a</span> <span>-></span> bool)</span></span> <span>-></span> <span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></code></dt><dt class="spec value" id="val-map"><a href="#val-map" class="anchor"></a><code><span class="keyword">val</span> map : <span>f:<span>(<span class="type-var">'a</span> <span>-></span> <span class="type-var">'b</span>)</span></span> <span>-></span> <span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span> <span>-></span> <span><span>(<span class="type-var">'t</span>, <span class="type-var">'b</span>, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></code></dt><dt class="spec value" id="val-fold_of_pervasives_map_fold"><a href="#val-fold_of_pervasives_map_fold" class="anchor"></a><code><span class="keyword">val</span> fold_of_pervasives_map_fold : <span>fold:<span>(<span>(<span class="type-var">'key</span> <span>-></span> <span class="type-var">'value</span> <span>-></span> <span class="type-var">'accum</span> <span>-></span> <span class="type-var">'accum</span>)</span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span class="type-var">'accum</span> <span>-></span> <span class="type-var">'accum</span>)</span></span> <span>-></span> <span><span>(<span class="type-var">'t</span>, <span class="type-var">'key</span> * <span class="type-var">'value</span>, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></code></dt><dt class="spec value" id="val-iter_result"><a href="#val-iter_result" class="anchor"></a><code><span class="keyword">val</span> iter_result : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, unit)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span>f:<span>(<span class="type-var">'a</span> <span>-></span> <span><span>(unit, <span class="type-var">'err</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.result</span>)</span></span> <span>-></span> <span><span>(unit, <span class="type-var">'err</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.result</span></code></dt><dt class="spec value" id="val-fold_result_until"><a href="#val-fold_result_until" class="anchor"></a><code><span class="keyword">val</span> fold_result_until : <span>fold:<span><span>(<span class="type-var">'t</span>, <span class="type-var">'a</span>, <span class="type-var">'accum</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Container.fold</span></span> <span>-></span> <span>init:<span class="type-var">'accum</span></span> <span>-></span> <span>f:<span>(<span class="type-var">'accum</span> <span>-></span> <span class="type-var">'a</span> <span>-></span> <span><span>(<span><span>(<span class="type-var">'accum</span>, <span class="type-var">'err</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Result.t</span>, <span class="type-var">'final</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Continue_or_stop.t</span>)</span></span> <span>-></span> <span>finish:<span>(<span class="type-var">'accum</span> <span>-></span> <span class="type-var">'final</span>)</span></span> <span>-></span> <span class="type-var">'t</span> <span>-></span> <span><span>(<span class="type-var">'final</span>, <span class="type-var">'err</span>)</span> <a href="../index.html#module-IStd">IStdlib.IStd</a>.Result.t</span></code></dt></dl></div></body></html> |