          (map #(-> [(get next-order-map (:dest %)) %])))))
 
 
-(defn- next-power-of-2
+(defn next-power-of-2
   "A helper for cross counting; the number of leaf nodes in the accumulator tree
   needs to be the first power of 2 greater than the number of nodes in one layer.
   This function sets all the bits to the right of the first bit set in a 32 bit

               (inc exp))))))


(defn- single-edge-super-crossings
  "Counts the number of crossings that result from adding an edge, in order,
  to the accumulator tree. If the index is even, meaning it's a right
  child of its parent, we increment its value. If the index is

  (map->Segment (assoc edge :layer-id layer-id)))


(defn add-edge [graph last-node node characters]
  "Creates an edge and adds it to the graph as a whole and to each participating node"
  (let [weight (count characters)
        forward-edge (Edge. node characters weight)
