服务器下面的代码显示列表中的整数.
(defun isNum (N)
(and (<= N 9) (>= N 0)))
(defun count-numbers (list)
(let ((count 0))
(dolist (item list count)
(cond
((null list) nil)
(((and (<= N 9) (>= N 0))) item)(incf count))
(setq(0 + count))))))
Run Code Online (Sandbox Code Playgroud)
我A' is not of the expected type运行命令时得到错误REAL'(count-numbers'(3 4 5 6 a 7 b))
lisp ×1