 import RxSwift
 
 extension ObservableType {
-
   func compactMap<R>(_ transform: @escaping (Element) throws -> R?) -> Observable<R> {
     self
       .map(transform)

}

extension PrimitiveSequence where Element == Never, Trait == CompletableTrait {

  func andThen(using body: () -> Completable) -> Completable { self.andThen(body()) }

  func wait(

      defer { condition.unlock() }
      trigger = true
      condition.broadcast()
    }, onError: { _ in
      condition.lock()
      defer { condition.unlock() }
      trigger = true
