                %))
        (reduce #(if (and (instance? SegmentContainer (peek %1))
                          (instance? SegmentContainer %2))
-                  (update-in %1 [(dec (count %1)) :segments] rrb/catvec (:segments %2))
+                  (update-in %1 [(dec (count %1)) :edges] rrb/catvec (:edges %2))
                   (conj %1 %2))
                [])
        (assoc layer :minus-ps)))

      (assoc layer :positions positions)
      (let [item (first minus-ps)
            c-p (if (instance? SegmentContainer item)
                  (+ current-position (count (:segments item)))
                  (inc current-position))]
        (recur (rest minus-ps) c-p (assoc positions item (inc current-position)))))))


  next layer. ESK's description of the position algorithm is almost willfully circuitous
  and obtuse, so here's a simplified description: An item's position in an ordered layer
  is the sum of the size of all previous items, plus 1, where the size of a segment
  container is the number of edges it contains, and the size of a node is 1.

  Also, it doesn't really matter what seed you choose for the initial value of the sum. I
  chose -1, which is implied by the description in ESK."
