 
 (cl-defun mesh:find-next-index-rec (index maxindex lst)
   (if (or (colle:empty-p lst)
-          (eq index maxindex))
+         (eq index maxindex))
       nil
     (cl-letf* ((target (1+ index))
                (next (seq-find (lambda (e) (cl-equalp e target))  lst)))

    (pcase (seq-length panes)
      (1 nil)
      ((let `nil nextindex)
       (seq-find
        (lambda (pane)
          (eq minindex (glof:get pane :index)))
        panes))
      ((let _ nextindex)
       (seq-find
        (lambda (pane)
          (eq nextindex (glof:get pane :index)))
        panes)))))

(cl-defun mesh:find-next-tab (curtab tabs)
  (cl-letf* ((indices (mesh:sort-numbers (mesh:get-indices tabs)))

  (pcase thing
    (`[:tab ,tab] (mesh:find-prev-tab tab lst))
    (`[:session ,session] (mesh:find-prev-session session lst))))

(cl-defun mesh:find-index (index things)
  (colle:find
   (lambda (x)
     (eq index (glof:get x :index)))
   things))

(cl-defun mesh:find-next-pane (curpane panes)
  (cl-letf* ((indices (mesh:sort-numbers (mesh:get-indices panes)))
