 (defn undoable
   "Middleware which stores an undo checkpoint."
   [handler]
-  (fn new-handler
+  (fn undoable-handler
     [app-db event-vec]
     (store-now!)
     (handler app-db event-vec)))

  Includes a clojure.data/diff of the db, before vs after, showing the changes
  caused by the event."
  [handler]
  (fn new-handler
    [db v]
    (if (satisfies? IReactiveAtom db)
      (str "re-frame: \"debug\" middleware used without prior \"pure\"."))

  [f]
  (fn middleware
    [handler]
    (fn validate-handler
      [db v]
      (f (handler db v)))))

