   Reversible
   (rev [this]
     (assoc this
-      :succs preds
-      :preds succs
-      :ps qs
-      :qs ps
-      :layers (vec (rseq layers)))))
+           :succs preds
+           :preds succs
+           :ps qs
+           :qs ps
+           :layers (vec (rseq layers)))))
 
 (defrecord SparseLayer [id duration nodes])
 (defrecord OrderedGraph [layers succs preds ps qs minus-ps minus-qs characters]
   Reversible
   (rev [this]
     (assoc this
-      :succs preds
-      :preds succs
-      :ps qs
-      :qs ps
-      :minus-ps minus-qs
-      :minus-qs minus-ps
-      :layers (vec (rseq layers)))))
+           :succs preds
+           :preds succs
+           :ps qs
+           :qs ps
+           :minus-ps minus-qs
+           :minus-qs minus-ps
+           :layers (vec (rseq layers)))))
 
 (defrecord OrderedLayer [id duration items])
 (defrecord CountedAndMarkedGraph [layers succs preds crossings marked characters]) ; still has OrderedLayers

  Reversible
  (rev [this]
    (assoc this
      :succs preds
      :preds succs
      :layers (vec (rseq layers))))
  Flippable
  (flip [this]
    (assoc this
      :aboves belows
      :belows aboves
      :top-idxs bot-idxs
      :bot-idxs top-idxs)))

(defrecord FlatLayer [id duration items])
(defrecord BlockGraph [blocks succs preds sources])

              last-node (-> new-g :last-nodes-by-character character)
              disappeared (contains? (-> node :path-mods character) :disappeared)
              g (cond-> new-g
                  disappeared (update-in [:last-nodes-by-character] dissoc character)
                  (not disappeared) (->
                                     (assoc-in [:last-nodes-by-character character] node)
                                     (update-in [:last-nodes-by-node (:id node)] (fnil conj #{}) character))
                  last-node (update-in [:last-nodes-by-node (:id last-node)] disj character))]
          (recur g (rest characters)))))))


