        first
        (dispatch))
 
+
+  (dispatch {:unit :server
+             :components {:a #(println "a" %)
+                          :b #(println "b" %)
+                          :c #(println "c" %)
+                          :d #(println "d" %)
+                          :e #(println "e" %)
+                          :f #(println "f" %)
+                          :browser #(println "browser" %)
+                          :server #(println "server" %)}
+             :ruleset {:units {:browser #{:a :b :c}
+                               :server #{:d :e :f}}}}
+            {::component (list :c)
+             :foo :bar})
+
   )

           :evmsgs []}
          eventhandlers))

(defn advance [{:keys [unit ruleset] :as router} msg]
  "Takes a message, runs it against ruleset and returns a sequence of routed messages."
  (debug "routing starting with" (printable-msg msg))
  (if (< (::transition-count msg) 100)

    (do (warn "dropping message due to high transition-count")
        [])))

(defn make-router [ruleset components & {:keys [unit dispatch?]
                                         :or {dispatch? true}}]
  {:unit unit
   :components components
   :ruleset ruleset
   :dispatch? dispatch?})

