In the spirit" of the Lisp examples done in class, write short and simple recursive Lisp functions which perform the following tasks. Hand in a paper copy of your source code for each function, hand-written or typed or a file print-out or a screen dump. You need not hand in a demo of your code, nor test your code even for yourselt but you are of course welcome to do so! The functions you are being asked to write should all be just three or four lines in length, and writing them should be easy enough that testing them might not be necessary if you are confident in your understanding of elementary Lisp.) (1). Write a function (INCNUMLIST) which takes a list NUMLIST of numbers and returns the result of adding 1 to each element in the list. For example: (INC (5 3702 3)) should return (648134), (INC '(1 23) should return (234), (INC nil) should return nil (2). Write a function (PAIRUP L) which takes a list L and returns the resuli of grouping consecutive elements ofL in pairs. For example: (PAIRUP '(123456) should return ((12) (34) (S6), (PAIRUP '(ABCDE shouid return ((AB) (CD) (E)), (PAIRUP ((A) BC(D)) should return (((A)B) (C (DE))) (PAIRUP ni) should return nil. (3). Write a function (PARENS L) which takes a list L and returns the result of it in a manner that will become clear from the following examples: (PARENS (ABCDE should retun (A ( CD (E) (PARENS (A AA)) (PARENS (X)) (PARENS (1 2 (3 4)5)) sbould return ( (2034)5 (PARENS nil) should return (A (A (A)) shouid return CX) should return nil. (4), write a function (MERGESORT NUSTI NLIST2) which takes two lists,NUST and NLIST2 of numbers (assumed to already be in ascending order) and returns the result of merging them For example: (MERGESORT (11247) (1223469)) should return (1 11222344679), (MERGESORT (22358) (135)) should return (1 22 33558), MERGESORT (123) nil) should return 23). (5). Write a function (ALTMERGE LI L2) which takes two ists L1 and L2 and merges them alternately. For example: (continued on back) (ALTMERGE (123) '(XYZ)) (ALTMERGE (WEAWQ (177326 should return(W1E7A7 W3Q26), (ALTMERGB SDCQW (A (3 2))) should retum (SAD 3 2) (Q w) Q), (ALTMERGE nil (ABCDE)) should retum (1 X2 Y3z), should returm (ABCDE). (6). Write a function (UNMERGE L) which takes a list L and returns the result of alternately "unmerging" it into two sublists. UNMERGB should return the two sublists as elements in a list. For example: (UNMERGE (1 2 3 4 5 6) should return ((1 35) (246)), (UNMERGE (ABCDE)) should return ( (ACB) (BD)), (UNMERGE (X (YZ)W)) (U MERGE (UNMERGE nil) should return (CW) ((YZ)) ), should return ((A) nil), should return (nil nil). (A)) (2) . Hint: You can write this function as "self-contained", but it is perhaps easier to first write auxiliary functions (ODD L) and (EVENL). What these functions should do is up to you to figure out!] (7). Write a function (COPY S N) which takes an S-expression S and an integer N20 and returns a list consisting of N copies of S. (You can assume N is non-negative, i.e., no error checking is needed.) For example: (COPY*A7) should return (AAAAAAA), (COPY '(X Y) 3) should retum ((XY) (XY (XY)), (COPY 3 4) should return (3 3 3 3) (COPY 'Z 1) should return (Z), (COPY X 0) should return nil, (COPY nil 5) should returm (nil nil ni nil nil). (8). Write a function (REPLICATE L NLIST) which takes a list L and a list NLIST of integers (all of which can be assumed to be 2 0) and which uses NLIST as a "template" to produce a new list in which each element of L is replicated the number of times specified in NLIST. For example: (REPLICATE (ABCDE) (10432)) should return (ACCCCDDDEE), REPLICATE (WXYZXQW) (3 401)) should return(WwwXXXXZ), (REPLICATE'(1231) (1 2 3 4 5 6)) should retum (1223331111), (REPLICATE (XWXEDR) nil) should return nil, (REPLICATE nil 10032) should return nil