   [x]
   (satisfies? SignalProtocol x))
 
-(defn- subscribed-topics-message-emitter
+(defn- relayed-events-message-emitter
   [topics]
   (let [topics (if (set? topics) topics (set topics))]
     (fn [prev event]


(defn async
  [source]
  (let [topic source]
    (map->Signal {:init (:init source)
                  :event-emitter [source (fn [message]
                                           (when (fresh? message)
                                             (:value message)))]
                  :subscribed-topics #{topic}})))

(defn mergeseq
  [sigs]

        (->Cached (:value prev))))))

(defrecord Signal
  [init message-emitter relayed-events deps event-sources]
  SignalProtocol
  (sources [_]
    (or deps
        (->> message-emitter
             first
             vector
             flatten
             (filter signal?)
             (into #{}))))
  (message-emitter [_]
    (cond
      message-emitter message-emitter
      relayed-events [:events (relayed-events-message-emitter relayed-events)])))

(defn- messages-from-events
  [topic]
