title: RxSwift: How to merge array of Completable to Completable
body: <p>I have some array of values in my code and I'd like to pass it through sequence of Single and Completable methods:</p>
  
  <pre><code>let data: [DataClass]
  
  func method1(_ data: DataClass) -&gt; Single&lt;DataClass2&gt; { ... }
  func method2(_ data2: DataClass2) -&gt; DataClass3? { ... }
  func method3(_ data3: DataClass3) -&gt; Completable { ... }
  </code></pre>
  
  <p>I try to do it with this code:</p>
  
  <pre><code>func iNeededMethod() -&gt; Completable {
  
      return Completable.merge(
        data
          .flatMap { value -&gt; Completable in
            method1(value)
              .map(method2)
              .filter { $0 != nil }
              .map { $0! }
              .map(method3)
      })
    }
  </code></pre>
  
  <p>But it doesn't work for me with error:</p>
  
  <pre><code>Cannot convert value of type 'PrimitiveSequence&lt;MaybeTrait, Completable&gt;' (aka 'PrimitiveSequence&lt;MaybeTrait, PrimitiveSequence&lt;CompletableTrait, Never&gt;&gt;') to closure result type 'Completable' (aka 'PrimitiveSequence&lt;CompletableTrait, Never&gt;')
  </code></pre>
  
  <p>What did I do wrong?</p>