title: What is the difference between concatMap and flatMap in RxJava
body: <p>It seems that these 2 functions are pretty similar. They have same signature (accepting <code>rx.functions.Func1&lt;? super T, ? extends Observable&lt;? extends R&gt;&gt; func</code>), and their marble diagrams look exactly same. Can't paste the pics here, but here's one for <a href="http://netflix.github.io/RxJava/javadoc/rx/Observable.html#concatMap%28rx.functions.Func1%29">concatMap</a>, and here's one for <a href="http://netflix.github.io/RxJava/javadoc/rx/Observable.html#flatMap%28rx.functions.Func1%29">flatMap</a>. There seems to be some subtle difference in the description of resulting <code>Observable</code>, where one produced by <code>concatMap</code> contains items that result from concatinating resulting Observables, and the one produced by <code>flatMap</code> contains items that result from first merging the resulting Observables, and emitting the result of that merger.</p>
  
  <p>However, this subtlety is totally unclear to me. Can anyone give a better explanation of this difference, and ideally give some examples illustrating this difference.</p>