Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN ML Exercise 8 Write a function sorts of type real . real * real - real list that returns a list of three real
IN ML
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started