   (let [h (dec i), m (dec n), cur (cursor cm i)]
     (cond
       (neg? n)
-      (println "infinite loop")
+      (guard)
 
       (nil? cur)
       :do-nothing

  [cm cur n]
  (let [{:keys [left-cur i start ch bof]} (get-info cm cur)]
    (cond
      (<= n 0), (do (println "infinite loop") nil)
      (closing-delim? cm cur), left-cur
      bof, nil;
      (zero? ch), (fn [] (bkwd-down cm (cursor cm (dec i)) (dec n)))
      :default, (fn [] (bkwd-down cm (cursor cm (- i (- ch start))) (dec n))))))


(defn idx-of-next [cm i chars member max]
  (let [{:keys [right-char]} (get-info cm (cursor cm i))]
    (cond
      (= i max), (guard)
      (= member (contains? chars right-char)), i
      :default, (fn [] (idx-of-next cm (inc i) chars member max)))))

