           ((eq (- (length sessions) 1) current-session-pos)
            (car sessions))
           ((< current-session-pos (- (length sessions) 1))
-           (cl-nth-value (+ current-session-pos 1) sessions))
+           (seq-elt sessions (+ current-session-pos 1)))
           (t nil))))
 
 

          ((eq 0 current-session-pos)
           (car (last sessions)))
          (t
           (cl-nth-value (- current-session-pos 1) sessions)))))

(cl-defun mesh:find-missing-index (fn lst)
  (cl-letf ((indices (seq-map fn lst)))


;;; Code:

(require 'seq)
(require 'mesh-class "lib/mesh-class")

(defcustom mesh:default-tab-name "eshell"
