lispで関数を書いていますが、結果が得られません。関数は、式の原子の数を数えることです。
(defun count-atoms(exp)
'Return the total number of non-nil atoms in the expression'
(cond((null exp) 0)
((atom exp) 1)
( t (+ (count-atoms (first exp))
(count-atoms (rest exp))))))
clispで実行すると、結果なしで次のようになります。
[3]> (count-atoms '(a b c))
(COND ((NULL EXP) 0) ((ATOM EXP) 1)
(T (+ (COUNT-ATOMS (FIRST EXP)) (COUNT-ATOMS (REST EXP)))))
誰か助けてもらえますか?