title: Get list from Single<List> observable
body: <p>I have a method which returns <code>Single&lt;List&lt;HistoryItem&gt;&gt;</code>. Now  I want to get list from this.</p>
  
  <pre><code>private fun getListOfDownload(): ArrayList&lt;HistoryItem&gt; {
      val downloads = manager.lastHundredVisitedHistoryItems()
      downloads.subscribe { t -&gt;
          return t; // not allowed
      }
  }
  </code></pre>
  
  <p>I could use <code>subscribe</code>  but that does not allow me to return list from that.</p>
  
  <p>I tried <code>map</code> also.</p>
  
  <pre><code>downloads.map { t: List&lt;HistoryItem&gt; -&gt; return t } // again `return t` is not allowed.
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I could make this work by following</p>
  
  <pre><code>private fun getListOfDownload(): ArrayList&lt;HistoryItem&gt; {
          var list = ArrayList&lt;HistoryItem&gt;()
          val downloads = manager.lastHundredVisitedHistoryItems()
          downloads.subscribe { t -&gt;
              list = t as ArrayList&lt;HistoryItem&gt;
          }
          return list
      }
  </code></pre>
  
  <p>Please tell </p>
  
  <ul>
  <li>If this way is right &amp; will it not block main thread?</li>
  <li>Is there not a way to return the list without declaring another
  list?</li>
  </ul>
  
  <p>I am new to Reactive programming so please explain me.</p>