ript">var halted = stream.combine(function(stream) {
    return stream.HALT
}, [stream(1)])

halted.map(function() {
    // never runs
})
</code></pre>
<hr>
<h3 id="stream-states"><a href="#stream-states">Stream states</a></h3>
<p>At any given time, a stream can be in one of three states: <em>pending</em>, <em>active</em>, and <em>ended</em>.</p>
<h4 id="pending-state"><a href="#pending-state">Pending state</a></h4>
<p>Pending streams can be created by calling <code>stream()</code> with no parameters.</p>
<