tion(value) {
    return value * 2
})

console.log(doubled()) // logs 2
</code></pre>
<p>Dependent streams are <em>reactive</em>: their values are updated any time the value of their parent stream is updated. This happens regardless of whether the dependent stream was created before or after the value of the parent stream was set.</p>
<p>You can prevent dependent streams from being updated by returning the special value <code>stream.HALT</code></p>
<pre><code class="lang-javascript">var halted = stream(1).m