小编Alv*_*uan的帖子

'A'不是预期类型'REAL'

服务器下面的代码显示列表中的整数.

(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
推荐指数
1
解决办法
1478
查看次数

标签 统计

lisp ×1