Subversion Repositories programming

Rev

Rev 100 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
67 irasnyd 1
;Written By: Ira Snyder
2
;Due Date: 02-14-2005
3
;Homework #: Hw09 (Exercise #13)
108 ira 4
;License: Public Domain
67 irasnyd 5
 
6
;;; My assumption on this homework is that you meant to
7
;;; mean that I should make an iterative version of NONE
8
;;; from Exercise 11 (HW06), not AL1 from Exercise 6.
9
(defun NONE (L)
10
  (do ((L L (cdr L))
11
       (NO 0)
12
       (NE 0))
13
      ((null L) (list NO NE))
14
    (if (oddp (car L)) (setf NO (1+ NO)) (setf NE (1+ NE)))
15
  )
16
)
17