Question: write this in ML Write a function named of type that takes a 2-tuple as an argument and returns a list of the 2 integers
Write a function named of type that takes a 2-tuple as an argument and returns a list of the 2 integers in sorted order, smallest first. Write a function named of type whose output list is the same as the input list, but with the first element of the list moved to the end. For example, should return (Hint: Use@) Write a function named that removes the second element from a list. In other words, when given a list , the function should evaluate to Note: the "Warning: match nonexhaustive" error is acceptable for this function, since we have not yet learned how to correct for this. (See hit below). Write a function named of type that takes a 3-tuple as an argument and returns a list of the 3 integers in sorted order, smallest first. (Hint: use carefully indented, carefully commented, nested if statements) Think of the cons operator as either: - Removing an element from the list (when used in the argument for a function) - Adding an element to the front of the list (when used in the function body) Try experimenting with using the cons operator more than one time in the argument of the function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
