2. (S points) Write a function to convert a list of strings into an indexed list of strings. Indices for this particular.problem must start at 1. Examples: Input: List ("he11o", "world", "my", "cat", "is", "grumpy", "today") Output: List( ("he1lo", 1), ("world", 2), ("my", 3), ("cat", 4), ("is", 5), ( "grumpy", 6), ("today", 7)) Restrictions: - Yqu are allowed to use just the basic list operations such as cons of an element to a list (ia), concatenation of two lists ( ++ , or :.. operators) and list length operations. - List API functions length, reverse, map, filter, foldleft and foldRight are allowed. - No other list API functions. - var, loops or recursion are not allowed. Given program: def nakeIndexedList (1st: List [ string ]):List[( String, Int )]1 /IYOUR SOLUTION Test program: seb t1 - a0ktrodexsdhetsist (me12on) sad 02 - eaktetedexedtaus(tist ("he110\%, -world" 1) sez 43 - exsatndergdederisit) A?eEt(ts - B11, thtsat 3 ta1led - your code returned (t3") 3. (5 points) Given a list of numbers, partition the list into a pair of lists where the first list contains only the even numbers and the second list contains only the odd numbers. Both the output lists must contain the elements in the same order as they occur in the input list. The result of partition an empty list is a pair of empty lists. Example: Input: List (1,2,8,7,5) Output: (List (2,8), List (1,7,5)) Restrictions: - Yqu are allowed to use just the basic list operations such as cons of an element to a list (ii) and concatenation of two lists (++, or :.: operators). Page 2 of 3 Last update: 2023-03-15 - List API functions map, filter, foldheft and foldight but no other list API functions.. - Do not use var, loops or recursion. Given program: def oddsyenPartition (1st: List [Int]): (List [Int], List [ Int ]) = I //YOUR SOLUTION Xa1 x= gdderenpartition(List (1,2,8,7,5)) assert (x.1=List(2,8) \&\& x.2=List(1,7,5), anTegt 1 failed - your code returned $x") Ya1 Y= oddevenPartition (ist (23,18,20,15)) assert (y_1= List (18,20) \&E y2= List (23,15), s" Hest 2 failed -. your code returped sy") Ta1 z= odderenPartition(List (14,12,18,20)) ssaert(z. 1= Liat (14,12,18,20)&6z.2= List () , sweat 3 failed -- your code returned $z) Tal w= oddevenPartition(List ()) assert (w. 1= List () th w. 2= List (), JnTest 4 failed - your code returned \$w").