   [id]
   (.getElementById js/document id))
 
-(defn by-tag
-  [tag-name]
-  (aget (.getElementsByTagName js/document tag-name) 0))
-
 (defn attr!
   [el attr val]
   (aset el attr val)

    (.beginPath ctx)
    (.arc ctx x y radius 0 (* 2 js/Math.PI) false)
    (.fill ctx)
    (.closePath ctx)))

(extend-type Rect
  IDrawable

    (when-let [event (<! ch)]
      (cond
        (contains? #{:up :down} event)
        (swap! state (fn [{id :current-paddle :as state}]
                       (assoc state id (control! (id state) event))))

        (contains? #{:paddle-1 :paddle-2} event)
        (swap! state assoc :current-paddle event)
