    (reaction (:key @db))))
 
 
-(register-sub
- :attempts
- (fn
-   [db _]
-   (let [misses (reaction (:misses @db))]
-     (reaction (count @misses)))))
-
-
 (defn win-game?
   [word guesses]
   (= (set word) (set guesses)))
+
 (defn lose-game?
   [misses]
   (<= max-attempts (count misses)))

        (if (end-game? @word @guesses @misses)
          :end 
          :play))))))










(register-sub
  :visible-todos
  (fn [db _]
      (reaction (let [filter-fn (filter-fn-for (:showing @db))
                      todos     (vals (:todos @db))]
                     (filter filter-fn todos)))))

(register-sub
  :completed-count
  (fn [db _]
      (reaction (completed-count (:todos @db)))))

(register-sub
  :footer-stats
  (fn [db _]
      (reaction
        (let [todos (:todos @db)
              completed-count (completed-count todos)
              active-count    (- (count todos) completed-count)
              showing         (:showing @db)]
             [active-count completed-count showing]))))  ;; tuple

   [db _]
   (reaction (:misses @db))))

(register-sub
 :key
 (fn
