Question: do question 7 and 10 in sml language Exercise 7 Write a function cyclel of type 'a list -> 'a list whose output list is
Exercise 7 Write a function cyclel of type 'a list -> 'a list whose output list is the same as the input list, but with the first element of the list moved to the end. For example, cyclel [1,2,3,4] should return [2,3,4,1). Exercise 8 Write a function sort 3 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 del3 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. cercise 10 Write a function sgsum of type int -> int that takes a non-neg- ative integer n and returns the sum of the squares of all the Your function need not behave well on inputs less than zero
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
