Implementation of member


; Test membership of item x in list lst
(define (member1 x lst)
  (if (pair? lst)
      (if (equal? x (car lst))
          lst
          (member1 x (cdr lst)))
      #f) )

> (define club '(tom dick harry)) club

> (member1 'dick club) (dick harry)

> (member1 'fred club) #f

Contents    Page-10    Prev    Next    Page+10    Index