Question: Please I need help with this. Thank you Write the function cycle of type 'a list *int-> 'a list that takes a list and an
Write the function cycle of type 'a list *int-> 'a list that takes a list and an integer n as input and returns the same list, but with the first element cycled to the end of the list n times. For example, cycle ([1,2,3,4,5,6], 2) should return [3,4,5,6,1,2)]. You can make use of the cycle 1 function given below as a helper function. fun cycle1 list- tl list hd list]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
