   #?(:clj  (:import io.reactivex.BackpressureStrategy
                     io.reactivex.Emitter
                     io.reactivex.Flowable
+                    io.reactivex.Completable
+                    io.reactivex.Maybe
                     io.reactivex.Observable
                     io.reactivex.ObservableOnSubscribe
                     io.reactivex.Observer

         (f)))))

#?(:clj
   (defn as-predicate
     "Wrap the provided function into a Predicate instance."
     ^Predicate
     [f]


(defn transform
  "Transform the observable sequence using transducers."
  [xform ob]
  (when-not (observable? ob)
    (throw (IllegalArgumentException. "Only observables are supported")))
  (letfn [(sink-step [sink]
            (fn
              ([r] (sink end) r)
