Question: Use ML patterns to write a function intersection ( S 1 , S 2 ) that returns the intersection of sets S 1 and S
Use ML patterns to write a function intersection S S that returns the
intersection of sets S and S Hint: usecall the function member from Q to check whether an element belongs to a set or not.
I used this function member code for Q:
fun membereL
if null L
then false
else if e hdL
then true
else memberetlL;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
