Assume (list 'red 'blue 'green 'yellow)
and (list 'black 'red 'orange 'green)
, then it should produce 2 since there are 2 same elements. I only know how to find the same elements in the exact same place as follows:
(define (helper l1 l2)
(cond
[(equal? l1) empty]
[(equal? l2) empty]
[(equal? (first l1) (first l2)) true]
[else (rest l1) (rest l2)]))
Help please. :)