title: Sequence of actions with RxSwift
body: <p>I'm using RxSwift to simply my code. For my current project I'd like to apply RxSwift's principles to a mess of completion blocks from the LayerKit: </p>
  
  <pre><code>layerClient.connectWithCompletion { (success, error) -&gt; () in
    if (!success) {
       // Error     
    } else {
      layerClient.requestAuthenticationNonceWithCompletion { (nonce, error) -&gt; () in
        // Even more blocks
      }
    }
  }
  </code></pre>
  
  <p>I'm thinking about something like this:</p>
  
  <pre><code>// In extension
  public func rx_connect() -&gt; Observable&lt;Bool&gt; {
      return create { observer in
  
          self.connectWithCompletion { (success, error) -&gt; ()in
              if (success) {
                  observer.on(.Next(success))
                  observer.on(.Completed)
              } else {
                  observer.on(.Error(error))
              }
          }
          return NopDisposable.instance
      }
  } 
  
  public func rx_requestAuthenticationNonce() -&gt; Observable&lt;String&gt; {
      // Same for annother method
  }
  
  // In AppDelegate
  self.layerClient.rx_connect()
   .then() // requestAuthenticationNonceWithCompletion and use the nonce for next action
   .then()
   .subscribeNext(…
   .onError(… // To catch all errors
  </code></pre>
  
  <p>RxSwift does not have a <code>then()</code> method. Is there another way to do this chaining stuff or am I thinking wrong on how to use ReactiveX in general?</p>