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

  (:require
    [reagent.ratom  :refer [IReactiveAtom]]
    [re-frame.undo  :refer [store-now!]]
    [re-frame.utils :refer [warn]]
    [clojure.data   :as data]))


;; See docs in the Wiki: https://github.com/Day8/re-frame/wiki

(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:
     (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
