Question: 2 Recursive list evaluation 2 Points Grading comment: (MARK A SINGLE CHOICE) Given the following definition of function f, which choice of return value below

2 Recursive list evaluation 2 Points Grading comment: (MARK A SINGLE CHOICE) Given the following definition of function f, which choice of return value below will cause the expression f [1; 2; 3];; to return [1; 4; 9]? let rec f lst = match lst with | [] -> [] | head::rest -> (* choose one from below *);; Choice 1 of 9:(head+head) * f rest Choice 2 of 9:(head*head) * f rest Choice 3 of 9:(head+head) @ f rest Choice 4 of 9:[head*head] @ f rest Choice 5 of 9:[head+head] * f rest Choice 6 of 9:[head*head] * f rest Choice 7 of 9:(head*head) @ f rest Choice 8 of 9:[head+head] @ f rest Choice 9 of 9:None of the above whats the

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 Law Questions!