         :r (+ 5 (* weight 10))
         :fill (if (> free 0)
                 "white"
-                "black ")
+                "gray")
         :stroke "black"
         :stroke-width 3
         }]

    edge))


(defn update-state [event world-state]
  (let [clicked-what (event->targetid event)
        constrained-flip (partial flip-edge world-state)]
    (if (re-matches #"edge.*" clicked-what)
      (update-in world-state [:edges clicked-what] constrained-flip)
      world-state)))

(go
  (let [vertices (<! (GET "./vertices.edn"))

    triangle-marker-ok
    triangle-marker-not-ok]
   (map svg-edge (make-edges world-state))
   (map (partial svg-vertex edges) (range) vertices)])



