I want
(member? 'a '((d d) (d d)))
to return false
what am I doing wrong
(define (member? x list)
(cond
((null? list) #t )
(else ( or (or (eq? (car (car list)) x) (eq? (cdr (car list)) x)) (member? x (cdr list) ))
)))
If someone can tell me what is wrong with my member function I would greatly appreciate it.
((null? list) #t )
You’re returning true if the list is empty. That’s wrong.