Answered step by step
Verified Expert Solution
Question
1 Approved Answer
do question 7 and 10 in sml language Exercise 7 Write a function cyclel of type 'a list -> 'a list whose output list is
do question 7 and 10 in sml language
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
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