   ;; The standard set of interceptors, defined above, which we
   ;; use for all todos-modifying event handlers. Looks after
   ;; writing todos to LocalStore, etc.
-  ;; NOTE: this chain includes `path` and `trimv`
+  ;; NOTE: this chain includes `path` and `trim-v`
   todo-interceptors
 
   ;; The event handler function.

  (fn [db [_ new-filter-kw]]     ;; new-filter-kw is one of :all, :active or :done
    (assoc db :showing new-filter-kw)))

;; NOTE: here is a rewrite of the event handler above using `path` and `trimv`
;; These interceptors are useful, but they are an advanced topic.
;; It will be illuminating if you compare this rewrite with the original above.
#_(reg-event-db
  :set-showing                    ;; event-id

  ;; this chain of 3 interceptors wrap the handler. Note use of `path` and `trimv`
  [check-spec-interceptor (path :showing) trim-v]

  ;; The event handler

  ;; And, further, it means the event handler returns just the value to be
  ;; put into `:todos` path, and not the entire `db`.
  ;; So, a path interceptor makes the event handler act more like clojure's `update-in`
  (fn [todos [text]]   ;; because of trim-v,  the 2nd parameter is NOT [_ text]
    (let [id (allocate-next-id todos)]
      (assoc todos id {:id id :title text :done false}))))

