这是我必须做的!我有很多列表,我必须返回没有整数的列表。LISP需要一些帮助来解决一个exsercise与LIST
(functInt '(f 3 (v) (((7))) n()))
-------->
(f (v) ((())) n())
这是我的代码:
(defun functInt (list)
(cond ((atom list) (if (not(integerp list)) list))
((null (cdr list)) (functInt (car list)))
(T (cons (functInt (car list)) (functInt (cdr list))))))
但我得到的是(F NIL V NIL N)
我怎样才能更正我的代码来获得我想要的输出?