Subversion Repositories programming

Rev

Rev 65 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
65 irasnyd 1
;;; Written By: Ira Snyder
2
;;; Due Date:   Wed 02-02-2005
3
;;; Homework #: HW05
4
 
5
;;;
6
;;; Count the number of numbers in an arbitrary
7
;;; depth expression
8
;;;
9
(defun COUNT# (E)
10
  (cond
11
    ((numberp E) 1)
12
    ((atom E)    0)
13
    (t           (+ (COUNT# (car E))
14
                    (COUNT# (cdr E))))
15
  )
16
)
17