title: RxSwift: how to have one observable trigger another one?
body: <p>Suppose I have observable <code>A</code>, and I am trying to create observable <code>B</code> that emits two events: the first when <code>A</code> emits an event, and the second 5 seconds later.</p>
  
  <p>So far I have the following:</p>
  
  <pre><code>self.B = Observable.create { [unowned self] observer in
              self.A.subscribe(onNext: {
                  observer.onNext(0)
                  self.delay(5) {
                      observer.onNext(1)
                  }
              })
              return Disposables.create()
          }
  </code></pre>
  
  <p>This works, but I feel uncomforatble subscribing to <code>A</code> from a closure. Is there a nicer way to do it?</p>
  
  <p>Thanks!</p>