<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>IOption (infer.IStdlib.IOption)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">IStdlib</a>» IOption</nav><h1>Module <code>IStdlib.IOption</code></h1></header><dl><dtclass="spec value"id="val-find_value_exn"><ahref="#val-find_value_exn"class="anchor"></a><code><spanclass="keyword">val</span> find_value_exn : <span><spanclass="type-var">'a</span> option</span><span>-></span><spanclass="type-var">'a</span></code></dt><dd><p>Like <code>Option.value_exn</code> but raises <code>Caml.Not_found</code> when called with <code>None</code>.</p></dd></dl><dl><dtclass="spec value"id="val-value_default_f"><ahref="#val-value_default_f"class="anchor"></a><code><spanclass="keyword">val</span> value_default_f : <span>f:<span>(unit <span>-></span><spanclass="type-var">'a</span>)</span></span><span>-></span><span><spanclass="type-var">'a</span> option</span><span>-></span><spanclass="type-var">'a</span></code></dt><dd><p>Like <code>Option.value ~default:(f ())</code> but <code>f</code> is called only if <code>None</code>.</p></dd></dl><dl><dtclass="spec value"id="val-if_none_evalopt"><ahref="#val-if_none_evalopt"class="anchor"></a><code><spanclass="keyword">val</span> if_none_evalopt : <span>f:<span>(unit <span>-></span><span><spanclass="type-var">'a</span> option</span>)</span></span><span>-></span><span><spanclass="type-var">'a</span> option</span><span>-></span><span><spanclass="type-var">'a</span> option</span></code></dt><dd><p><code>if_none_evalopt ~f x</code> evaluates to <code>f ()</code> if <code>x = None</code>, otherwise returns <code>x</code>. Useful for chaining matchers where the first returning non-<code>None</code> determines the result.</p></dd></dl><dl><dtclass="spec value"id="val-if_none_eval"><ahref="#val-if_none_eval"class="anchor"></a><code><spanclass="keyword">val</span> if_none_eval : <span>f:<span>(unit <span>-></span><spanclass="type-var">'a</span>)</span></span><span>-></span><span><spanclass="type-var">'a</span> option</span><span>-></span><spanclass="type-var">'a</span></code></dt><dd><p><code>if_none_eval ~f x</code> evaluates to <code>y</code> if <code>x=Some y</code> else to <code>f ()</code>. Useful for terminating chains built with <code>if_none_evalopt</code>. This is exactly the same as <code>value_default_f</code> but with a better name.</p></dd></dl><dl><dtclass="spec value"id="val-exists2"><ahref="#val-exists2"class="anchor"></a><code><spanclass="keyword">val</span> exists2 : <span><spanclass="type-var">'a</span> option</span><span>-></span><span><spanclass="type-var">'b</span> option</span><span>-></span><span>f:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'b</span><span>-></span> bool)</span></span><span>-></span> bool</code></dt><dd><p>Like <code>Option.exists</code> but gets two parameters.</p></dd></dl><dl><dtclass="spec value"id="val-map_changed"><ahref="#val-map_changed"class="anchor"></a><code><spanclass="keyword">val</span> map_changed : <span><spanclass="type-var">'a</span> option</span><span>-></span><span>equal:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span><span>-></span> bool)</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'a</span><span>-></span><spanclass="type-var">'a</span>)</span></span><span>-></span><span><spanclass="type-var">'a</span> option</span></code></dt><dd><p>Like <code>Option.map</code> but maintain physical