       (set-timeout! #(dispatch-helper events) ms))))
 
 
-;; Supply either a vector or a list of vectors. For example:
+;; Supply a vector. For example:
 ;;
 ;;   {:dispatch [:event-id "param"] }
-;;
-;;   {:dispatch (list [:do :all] [:three :of] [:these]) }
-;;
+
 (register
   :dispatch
   (fn [val]
-    (dispatch-helper val)))
+    (when-not (vector? val)
+      (console :warn "re-frame: :dispatch fx val expected vector got:" val))
+    (dispatch val)))
+
+
+;; Supply sequencial coll. For example:
+;;
+;;   {:dispatch-n (list [:do :all] [:three :of] [:these])}
+;;
+;; Coll can be anything that returns true to sequential? but should not be a map
+;; NOTE: this does not include Set
+(register
+  :dispatch-n
+  (fn [val]
+    (when (or (-> val sequential? not) (map? val))
+      (console :warn "re-frame: :dispatch-n fx val expected sequential not map got:" val))
+    (doseq [event val] (dispatch event))))
 
 
 (register
   :deregister-event-handler
   (fn [val]
     (if (sequential? val)
-      (doall (map re-frame.events/clear-handler! val))
-      (re-frame.events/clear-handler! val))))
+      (doall (map events/clear-handler! val))
+      (events/clear-handler! val))))
 
 
 (register

(ns re-frame.fx
  (:require [re-frame.router :refer [dispatch]]
            [re-frame.db :refer [app-db]]
            [re-frame.events]
            [re-frame.interop :refer [ratom? set-timeout!]]
            [re-frame.loggers    :refer [console]]))


;; -- Registration ------------------------------------------------------------



(defn dispatch-helper
  "There are cases where either one event is to be dipatched or a list of them"
  [event]
  (cond
    (vector? event) (dispatch event)
    (seq? event)    (dorun (map dispatch event))
    :else (console :error "re-frame: expected :dispatch event to be a list or vector, but got: " event)))

;; Example:
;; {:dispatch-later {200  [:event-id "param"]    ;;  in 200ms do this: (dispatch [:event-id "param"])
