Tail-Recursive intersection


(define (intersection lst m)
  (intersectionb lst m '()))

(define (intersectionb lst m int) (if (pair? lst) (intersectionb (cdr lst) m (if (memv (car lst) m) (cons (car lst) int) int)) int ))

Contents    Page-10    Prev    Next    Page+10    Index