How to write a scheme function that takes two lists and returns four lists

前端 未结 4 1697
后悔当初
后悔当初 2020-12-18 11:32

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

4条回答
  •  执念已碎
    2020-12-18 11:49

    Sure it's possible. Here are a couple hints:

    1. what's the result of combining a list and an empty list?
    2. You don't have to do it all at once. Take a piece at a time.

提交回复
热议问题