synchronous vs asynchronous sequences in RxJS
<p>I've got a quite basic, I guess, question about the difference between sync and async operators and sequences.</p>

<p>Everything that we deal with in programs might be represented as a sequence. It means I can have both:</p>

<ul>
<li>array of numbers as a sequence. It's something I would traditionally deal with synchronously, e.g. using a <code>reduce</code> function to count a sum or an average. But I need to know all elements in order to calculate it.</li>
<li>array of click events. They come asynchronously (in future &amp; I don't know how many and when they come).</li>
</ul>

<p>Using the common <code>Observable</code> datatype I can perform many operations on different elements, such as <a href="http://rxmarbles.com/#merge" rel="nofollow"><code>merge</code></a>, <a href="http://rxmarbles.com/#zip" rel="nofollow"><code>zip</code></a> etc.</p>

<p>The whole idea of RxJS is to treat sequences in an asynchronous manner, so <strong>my question is</strong> - what is the point of all <a href="http://rxmarbles.com/#average" rel="nofollow">average</a>, <a href="http://rxmarbles.com/#count" rel="nofollow">count</a>, <a href="http://rxmarbles.com/#max" rel="nofollow">max</a>, <a href="http://rxmarbles.com/#min" rel="nofollow">min</a>, <a href="http://rxmarbles.com/#reduce" rel="nofollow">reduce</a> etc operators, which need the sequence to be completed? If I can't add any element into the sequence (asynchronously add element to an array - why not?) so that it re-calculates - why should I use RxJS over Array.prototype.reduce?</p>

<p>In other words - initially I thought that a sequence should always be capable of performing operators on it (whateevr the operators are) <strong>also when the sequence is not completed</strong>. </p>