" class="anchor"></a><code><span><span class="keyword">val</span> totalize : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-state">state</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>totalize a q</code> returns a &quot;totalized&quot; version of automaton <code>a</code> by adding an extra &quot;sink&quot; state <code>q</code>. Raises <code>Invalid_arg</code> if <code>q</code> is alread