            ]]]]))))
 
 (def app-model
-  (atom {:current-slide 9
+  (atom {:current-slide 4
          :slides
          ;; TODO Add cardinal such that each slide has its own number to avoid react warning
          (vec

    (render [_]
      (html
       [:div
        #_[:p (str "Current slide is " (inc (:current-slide app)) "/" (count (:slides app)))]
        (om/build-all slide
                      (:slides app)
                      {:key :slideno :init-state chans :opts (:current-slide app)})]))))


(def debug false)

(defn new-random-pick [owner]
  (go-loop [c 4]
    (om/set-state! owner :pending-put nil)
    (let [n (inc (mod
                  (+
                   (om/get-state owner :pending-put)
                   (inc (rand-int 9)))
                  9))]
      (om/set-state! owner :pending-put n))
    (when (pos? c)
      (<! (timeout 30))
      (recur (dec c)))))

(defn put-and-take-slide [data owner opts]
  (reify
    om/IInitState
