HOMEWORK 3 Notes: -- How to hand in the functions you have to write in this homework will be explained later on. -- Before writing a function study its type. -- You have to use the same names as given for the functions to write. -- You may use some functions we define in class. -- You may need to define auxiliary functions. Write SML functions to do the following list manipulations duplicate(L): Duplicates each element of L. For example duplicate([1,2,3])=[1,1,2,2,3,3]. order(L): Determines if there is any order between the elements in L and returns 1 if the elements are sorted in non decreasing order, 2 in the case of non increasing order and 3 otherwise. For example order([1,1,2,3])=1, order([3,2,2,1])=2 and order([1,2,1,3])=3. flip(L): Flips alternate elements of L. For example flip([1,2,3,4])=[2,1,4,3]. split(L): splits the list L in half. For example split([1,2,3,4])=([1,2],[3,4]) and split([1,2,3])= ([1,2],[3]). Note that the first list must have one more element if the number of elements in L is not even. Good work!