Feb 21, 2006 07:03
Angie, I heard you recently swore off programming because of an evil parenthesis. I'm right there with you. Behold the crazyness that is Scheme. Evil, evil language.
(define deep-member?
(lambda (target alist)
(cond ((null? alist) #f )
((list? (car alist))
(or (deep-member? target (car alist))
(deep-member? target (cdr alist))))
(else(or(eqv? target (car alist))
(deep-member? target (cdr alist)))))))