   (rotate! angle))
 
 (defn draw!
+  "Draw the current state of the application."
   []
   (save!)
   (fill-style! "#222")

;;--------------------------------------------------------------------------------

(def slide-actions
  [nil
   go-go-slide1!
   ])

(def num-slides (count slide-actions))

(defonce slide-states (atom []))

(defn save-slide-state!
  []
  (let [i (:slide @state)]
    (swap! slide-states assoc i @state)))

(def in-transition? (atom false))

(defn next-slide!
  []
  (when-not @in-transition?
    (when-let [action (get slide-actions (inc (:slide @state)))]

      (untap tick-tap c))))

(defn multi-animate!
  "Helper for concurrent animations with `animate!`.
   Returns a channel that closes when all are done."
  [arg-pairs]
  (let [anims (->> (partition 2 arg-pairs)
                   (mapv #(apply animate! %)))]
    (go
      (doseq [a anims]
        (<! a)))))
