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

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


  (let [h (dec i), m (dec n), cur (cursor cm i)]
    (cond
      (neg? n)
      (guard)

      (bof? cm cur)
      :do-nothing
