Recursion Components
(defun find-even (list)
(if list
(let ((item (first list)))
;; First, see if you are done.
(if
(and (numberp item)(evenp item))
item
;; If not, call the same
;; function with a different
;; argument list.
(find-even (rest list)))))
Previous slide
Next slide
Back to first slide
View graphic version