   transforms an OrderedLayer into a FlatLayer composed of Nodes and Segments"
   [ordered-layer]
   (map->FlatLayer (assoc ordered-layer
-                    :items (map #(if (instance? Edge %)
-                                   (Edge->Segment % (:id ordered-layer))
-                                   %)
-                                (-> ordered-layer :items flatten)))))
+                         :items (map #(if (instance? Edge %)
+                                        (Edge->Segment % (:id ordered-layer))
+                                        %)
+                                     (-> ordered-layer :items flatten)))))
 
 
 (defn CountedAndMarkedGraph->FlatGraph

  Reversible
  (rev [this]
    (assoc this
      :src dest
      :dest src)))

(defrecord Segment [endpoints layer-id characters weight])


              (recur tree c (set/union marked m) parent-index))
            (let [t (-> (update-in tree [real-right-index :weight] + weight)
                        (cond->
                            is-seg-c (assoc-in [real-right-index :is-seg-c] true)
                            (not is-seg-c) (update-in [real-right-index :node-edges]
                                                      conj edge (rev edge))))]
              (recur t crossings marked parent-index))))))))


