This function generates a new list which contains all of the elements that appear in both listA and listB. The elements are compared using eq. The order of the elements in the resulting list is not defined.
Gamma> A = list(#a,#b,#c);
(a b c)
Gamma> B = list(#b,#c,#d);
(b c d)
Gamma> intersection(A,B);
(b c)
Gamma>