Closed. This question is off-topic. It is not currently accepting answers. Learn more。
想改进这个问题吗Update the question所以堆栈溢出的值小于aa>。
5年前关闭。
我需要编写一个lisp函数,从整数列表中消除x的每次出现例如,(elim 7'(7 6 8 8 7 9 0))返回(6 8 8 9 0)
如果您确实需要将其命名为
想改进这个问题吗Update the question所以堆栈溢出的值小于aa>。
5年前关闭。
我需要编写一个lisp函数,从整数列表中消除x的每次出现例如,(elim 7'(7 6 8 8 7 9 0))返回(6 8 8 9 0)
最佳答案
你不需要写它;它已经为你写了,它被称为remove
:
CL-USER> (remove 7 '(7 6 8 8 7 7 9 0))
;=> (6 8 8 9 0)
如果您确实需要将其命名为
elim
,则可以使用(setf fdefinition)
:CL-USER> (setf (fdefinition 'elim) (fdefinition 'remove))
;=> ...
CL-USER> (elim 7 '(7 6 8 8 7 7 9 0))
;=> (6 8 8 9 0)
关于function - 从lisp的整数列表中消除x的每次出现。,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19505693/
10-11 20:45