title: Conditional concat in RXJS?
body: <p>I have two streams : </p>
  
  <pre><code>const sourceOne = of(1, 2, 3);
  const sourceTwo = of(4, 5, 6);
  const example = sourceOne.pipe(concat(sourceTwo)); //123456
  </code></pre>
  
  <p>As you see  , I've concatenated them unconditionally.</p>
  
  <p>But it turns out that I need to concat them only if the first item from <code>sourceOne</code> is "even". (<code>%2==0</code>)</p>
  
  <p><strong>Question:</strong></p>
  
  <p>How can I concat <code>sourceTwo</code> to <code>sourceOne</code> by adding conditions regarding the first stream ?</p>
  
  <p><em>I know I can create an external method which will be piped , but I don't think it's the RXJS way of doing it.</em></p>