Question: Answer all parts correctly and step by step with explainations Consider the functions swap and pair, defined respectively as swap ( x , y )

Answer all parts correctly and step by step with explainations Consider the functions swap and pair, defined respectively as
swap(x,y)=(y,x)
pair xy=(x,y)
(a)(10 points). What is the type of swap?
(b)(10 points). What is the type of pair?
(c)(10 points). Notice that, in the types of swap and pair, that x and y(from the respective function definitions above) correspond to two different polymorphic type variables. Why is this, i.e., why wouldn't they be the same?
 Answer all parts correctly and step by step with explainations Consider

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!