</p>
<pre><code class="language-javascript">function plusOne(a) {
    return a + 1
}</code></pre>
<p>The problem with this implementation is that it can only be used with a number. However it&#39;s possible that whatever logic produces a value for <code>a</code> could also produce an error state (wrapped in a Maybe or an Either from a library like <a href="https://github.com/sanctuary-js/sanctuary">Sanctuary</a> or <a href="https://github.com/ramda/ramda-fantasy">Ramda-Fantasy</a>), or it could be a Mithril