Question: IN ML Exercise 8 Write a function sorts of type real . real * real - real list that returns a list of three real

IN ML

IN ML Exercise 8 Write a function sorts of type real .

Exercise 8 Write a function sorts of type real . real * real - real list that returns a list of three real numbers, in sorted order with the small est first. Exercise 9 Write a function de 13 of type 'a list -> 'a list whose output list is the same as the input list, but with the third element deleted. Your function need not behave well on lists with lengths less than 3. Exercise 10 Write a function sqsum of type int -> int that takes a non-neg- ative integer n and returns the sum of the squares of all the integers 0 through n. Your function need not behave well on inputs less than zero. Exercise 11 Write a 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 ele- ment cycled to the end of the list n times. (Make use of your cyclei function from a previous exercise.) For example, cycle (11,2,3,4,5,6),2) should return the list (3,4,5,6,1,2]

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!