 
 (defn unsubscribe [sub]
       (-unsubscribe sub))
-
-(defn reagent-subscribe [path]
-      (ReagentSubscription. (path->signal path) {}))
 
 (defn query [path]
       (let [sub (subscribe path)

                   (ifn? node)
                   (node path))))

(defn path->signal-fn [path]
      (if-let [f (path->derived-signal-fn path)]
              f
              #(default-signal-fn path)))

(defn path->signal [path]
      (if-let [signal (active-signals path)]
              signal
              (make-derived path (path->signal-fn path))))

(defn activate-signal [path signal]
      (set! active-signals (assoc active-signals path signal)))

(defn deactivate-signal [path]
      (set! active-signals (dissoc active-signals path)))

(defn reference [path]
      (SignalReference. path))

(defn subscribe [path]
      (let [sub (ManualSubscription. (path->signal path))]

                        (when (empty? watches)
                              (-remove-child signal this))))



(defn- make-derived [path f]
      (let [derived (DerivedSignal. path f nil -1 #{} #{})]
           (-refresh derived)
           (activate-signal path derived)
           derived))

(defn- add-refresh-queue [signal depth]
      (if-let [depth-queue (refresh-queue depth)]
              (set! refresh-queue
                    (assoc refresh-queue depth (conj depth-queue signal)))
              (set! refresh-queue
                    (assoc refresh-queue depth #{signal}))))

(defn- remove-refresh-queue [signal depth]
      (let [depth-queue (refresh-queue depth)]
           (if (= 1 (count depth-queue))
             (set! refresh-queue (dissoc refresh-queue depth))
             (set! refresh-queue
                   (assoc refresh-queue depth (disj depth-queue signal))))))

(defn- enqueue-refresh [signals]
      (doseq [signal signals]
             (add-refresh-queue signal (-get-depth signal))))

(defn- refresh []
      (while (seq refresh-queue)
             (doseq [depth-queue (vals refresh-queue)]
                    (doseq [signal depth-queue]
                           (remove-refresh-queue signal (-get-depth signal))
                           (-refresh signal)))))

(defn- run-with-deref-capture [signal]
      (if capturing?
        (let [child signal-being-captured
              childs-captured captured-parents]
