   (:require
     [reagent.core      :as     reagent]
     [re-frame.db       :refer  [app-db]]
-    [re-frame.handlers :as     handlers ]
+    [re-frame.handlers :as     handlers]
     [re-frame.subs     :as     subs ]))
 
 

  (fn handler
    ; "return true if anything is stored in the undo list, otherwise false"
    [_ _]
    (reaction (undos? @undo-list))))

(subs/register
  :redos?
  (fn handler
    ; "return true if anything is stored in the redo list, otherwise false"
    [_ _]
    (reaction (redos? @redo-list))))


;; -- event handlers  ----------------------------------------------------------------------------

                           @max-undos
                           (conj @undo-list @app-db)))))

(defn undos?
  []
  (>= (count @undo-list) 1))

(defn redos?
  []
  (> (count @redo-list) 0))


;; -- subscriptions  -----------------------------------------------------------------------------
