title: RXJS - Are nested concapMap equivalent to sequential concatMap?
body: <p>When using RXJS I ask myself if nested concatMap are equivalent to sequential ones. Consider the following example:</p>
  <pre><code>observable1.pipe(
     concatMap(result1 =&gt; observable2.pipe(
        concatMap(result2 =&gt; observable3.pipe(
           concatMap(result3 =&gt; of(result3)
        )
     )
  ).susbcribe((result) =&gt; {...});
  </code></pre>
  <p>This would result in <code>result</code> being <code>result3</code>. In order to avoid the nesting, I would like to write the same as follows:</p>
  <pre><code>of(null).pipe(
     concatMap(() =&gt; observable1),
     concatMap(result1 =&gt; observable2),
     concatMap(result2 =&gt; observable3),
     concatMap(result3 =&gt; of(result3))
  ).susbcribe((result) =&gt; {...});
  </code></pre>
  <p>This will result in in <code>result</code> being <code>result3</code> as well. Even though there might be differences on a detail level, can I assume that both ways to concatenate observable are considered to be equivalent (e.g. with respect to failures)?</p>
  <p>Any help is appreciated...</p>