         y (- x k)]
     [x y]))
 
-(defn- longest-snake
+(defn snake
   "Starting at point (x, y) return the x value of the point at the end of the
   longest snake on this diagonal. A snake is a sequence of diagonal moves
   connection match points on the edit graph."

            prev-v (get endpoints (dec d))
            [prev-k b] (if (< (x-down prev-v k) (x-up prev-v k))
                         [(inc k) (x-up prev-v k)]
                         [(dec k) (+ 1 (x-down prev-v k))])
            result (reduce conj
                           (conj result [x y])
                           (reverse

          []
          additions))

(defn path->script [a b path]
  (let [script
        (reduce (fn [e p]
                  (let [c (:current e)
                        x (first p)
