Subversion Repositories programming

Rev

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

;Written By: Ira Snyder
;Due Date: 02-14-2005
;Homework #: Hw09 (Exercise #13)
;License: Public Domain

;;; My assumption on this homework is that you meant to
;;; mean that I should make an iterative version of NONE
;;; from Exercise 11 (HW06), not AL1 from Exercise 6.
(defun NONE (L)
  (do ((L L (cdr L))
       (NO 0)
       (NE 0))
      ((null L) (list NO NE))
    (if (oddp (car L)) (setf NO (1+ NO)) (setf NE (1+ NE)))
  )
)