                               :height 500
                               :size 10
                               :speed 150
+                              :generation 0
                               :cells r-pentamino
                               :ctl (chan 0)}))
 

      [:div
       [:button {:on-click #(go (>! go-evolve :pause))} "Pause/Play"]
       [:button {:on-click #(go (>! go-evolve :kill))} "Stop"]
       [:button {:on-click #(swap! state assoc :cells r-pentamino)} "Reset"]
       [:button {:on-click #(swap! state update :size inc)} "+"]
       [:button {:on-click #(swap! state update :size dec)} "-"]]
      [:svg {:width (:width s)
             :height (:height s)
             :viewBox "-250 -250 500 500"}
       (for [[x y] (:cells s)]
         ^{:key (str [x y])}
         [:rect  {:width (- (:size s) 1)

                       (prn "Stopped!")
                       (do (<! ctl) (recur))))
            (timeout (:speed @state)) (do
                                        (swap! state update :cells evolve)
                                        (swap! state update :generation inc)
                            ;; (update-grid!)
                            (recur))))
    ctl))
;; (swap! state assoc :size 5)
;; (count (:cells @state))

(defn reset-life! [state]
  (swap! state assoc :cells r-pentamino)
  (swap! state assoc :generation 0))

(defn home-page [app-state]
  (let [s @state]
