title: How to merge producers in kotlin coroutines?
body: <p>Using <code>Rx</code> one can merge multiple subscription sources like the following</p>
  <pre><code>// psudo data repository
  
  fun getAllData(): Flowable&lt;DataType&gt; {
      return getCachedData().mergeWith(getRemoteData())
  }
  
  fun getCachedData(): Flowable&lt;DataType&gt; {
      // local database call
  }
  
  fun getRemoteData(): Flowable&lt;DataType&gt; {
      // network call
  }
  </code></pre>
  <p>in the code above <code>getAllData()</code> will return data as soon as one of the merged <code>Flowables</code> returns and then send the other once it's ready.</p>
  <p>Question is, How can I achieve the same result using Kotlin coroutine's <code>produce</code>?</p>