Question: SML Problem 4 (20 points) Write a function, called multiSetIntersection: 00a list list ? 00a list, that when passed a list of sets (which are
SML
Problem 4 (20 points) Write a function, called multiSetIntersection: 00a list list ? 00a list, that when passed a list of sets (which are also represented as lists) as input will return their intersection as output. For example, multiSetIntersection([s1,s2,s3,s4]) = s1 ? s2 ? s3 ? s4 multiSetIntersection( [] ) = [] Remark. An intersection of two sets is the set of all elements that are common to both sets. That is, an element x is a member of the intersection of S1 and S2, if and only if x is a member of S1 and x is a member of S2. This can be formally expressed as follows: x ? (S1 ? S2) ? x ? S1 ? x ? S2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
