   (:require
     [reagent.ratom  :refer [IReactiveAtom]]
     [re-frame.undo  :refer [store-now!]]
-    [re-frame.utils :refer [warn]]
+    [re-frame.utils :refer [warn log dbg group groupEnd]]
     [clojure.data   :as data]))
 
 
 ;; See docs in the Wiki: https://github.com/Day8/re-frame/wiki
 
+(defn noop
+  "Middleware which does nothing"
+  [handler]
+  handler)
+
 (defn pure
-  "Middleware which means a handler takes a value in the first parameter, not an atom.
-  If you strip away the error/efficiency checks, it is doing this:
+  "Acts as an adaptor, allowing handlers to be writen as pure functions.
+  The re-frame router will pass in an atom as the first parameter. This middleware
+  adapts that to the value within the atom.
+  If you strip away the error/efficiency checks, this middleware does this:
      (reset! app-db (handler @app-db event-vec))"
   [handler]
   (fn new-handler

      (handler db v))))




;; warning: untested
;; check the state of db AFTER the handler has run, using a prismatic Schema.
#_(defn check-schema


(defn path
  "Supplies a sub-tree of `app-db` to the handler.
  Assumes \"pure\" is in the middleware pipeline prior.
  Grafts the result back into app-db."
  [p]
  (fn middleware
