LISP:通过引用省略列表中的第一个值

LISP: Omit first value in list by reference

我只想使用函数省略列表的第一个值,但下面的代码是 returning 相同的列表
我不想从函数中 return 代码:

 #! /usr/bin/clisp    

(defun omit(lstold)
    (setf lstold (cdr lstold))
)
(setq x (list 3 1 2))
(omit x)
(write x)  --> gives output 3 1 2 ... why?

那是因为你没有修改你的 x,而你只是修改了你的本地 lstold,然后你把它返回到任何地方(即没有捕获返回值)。