Check out example codes for "Write a function that accepts as input two sets represented as lists and produces at output a list representing the intersection of the two sets. Example: >(union ’(a b c d e f) ’(a c f e x y)) ; Value: (a b c d e f x y)". It will help you in understanding the concepts better.

Code Example 1

(define (checkresult a b)
  (list (subtract a b)
        (subtract b a)
        (union a b)
        (intersect a b)))

Learn ReactJs, React Native from akashmittal.com