 stream, or a <a href="https://github.com/paldepind/flyd">flyd</a> stream, etc. Ideally, we wouldn&#39;t want to write a similar version of the same function for every possible type that <code>a</code> could have and we wouldn&#39;t want to be writing wrapping/unwrapping/error handling code repeatedly.</p>
<p>This is where Fantasy Land can help. Let&#39;s rewrite that function in terms of a Fantasy Land algebra:</p>
<pre><code class="language-javascript">var fl = require(&quot;fantasy-land&quot;)

function 