How to write a scheme function that takes two lists and returns four lists
I have 2 lists of elements '(a b c) '(d b f) and want to find differences, union, and intersection in one result. Is that possible? How? I wrote a member function that checks if there is a car of the first list in the second list, but I can't throw a member to the new list. (define (checkResult lis1 lis2) (cond........... )) (checkresult '( a b c) '(d b f)) My result should be (( a c) (d f) (a b c d f) (b)) . Like others have said, all you need to do is create separate functions to compute the intersection, union, and subtraction of the two sets, and call them from checkresult: (define