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

   (ok-to-flip? world-state edge)])


(defn fmap [f m]
  (into {} (for [[k v] m] [k (f v)])))


(defn make-edges [{:keys [vertices edges] :as world-state}]
  (let [locations (mapv second vertices)]
    (fmap (partial prepare-edge locations world-state) edges)
    ))




    ch))



(defn make-triangle-marker [id arrow]
  [:svg:marker
   {:id id
    :viewBox "-5 -5 20 20"
    :refX "5"
    :refY "5"
    :markerWidth "5"
    :markerHeight "5"
    :orient "auto"}
   arrow])


(def color->value {:red 1
                   :blue 2})

(def arrow-path "M0,0 L 10,5 L0,10 z")

(def triangle-marker-ok
  (make-triangle-marker "TriangleOK"
                        [:svg:path {:fill "white"
                                    :stroke "black"
                                    :d arrow-path}]))

(def triangle-marker-not-ok
  (make-triangle-marker "TriangleNotOK"
                        [:svg:path {:fill "black"
                                    :stroke "black"
                                    :d arrow-path}]))



(defn make-line-dirs [from to]
  (let [middle (map (comp #(/ % 2) +) from to)
        coords (map (partial string/join ",") [from middle to])]
    (string/join " " (map str ["M" "L" "L"] coords))))



(defn svg-edge [[id [from to color flippable?]]]
