Использование remove-if
:
(defun foo (n list)
(remove-if (constantly t) list :start (1- n) :count 1))
butlast
/ nthcdr
решение (исправлено):
(defun foo (n list)
(append (butlast list (1+ (- (length list) n))) (nthcdr n list)))
Или, может быть, более читабельно:
(defun foo (n list)
(append (subseq list 0 (1- n)) (nthcdr n list)))
Использование loop
:
(defun foo (n list)
(loop for elt in list
for i from 1
unless (= i n) collect elt))