Question: 3. (20 points) Write a recursive ML function cycle that, given a list L and an integer i, cycles L i times. For instance, if

3. (20 points) Write a recursive ML function cycle that, given a list L and an integer i, cycles L i times. For instance, if L = [1, 4, 5, 2], then cycle(L,1) returns (4, 5, 2, 1). Similarly, cycle(L, 2) returns returns [5, 2, 1,4]. Assume that i is greater than or equal to zero
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
