           (recur (zip/prev loc) (+ col (.length (zip/node loc)))))
       :else
         (recur (zip/prev loc) col))))
-
-(defn loc-text [loc]
-  (apply str (map zip/node 
-               (filter (comp string? zip/node) (zf/descendants loc)))))
 
 (defn loc-count [loc]
   (.length ^String (loc-text loc)))

        (start-offset (zip/up loc)))
    :else 
      (-> loc zip/node :offset)))

(defn loc-col [loc]
  (loop [loc (zip/prev loc) col 0]

  [loc]
  (and loc (remove zip/branch? (take-while (complement nil?) (iterate zip/prev (zip/prev loc))))))

(defn loc-text [loc]
  (apply str (map zip/node 
               (filter (comp string? zip/node) (zf/descendants loc)))))

(declare end-offset)

(defn start-offset [loc]
  (cond
