Question: SPLIT-LIST (BCD12345))((B D 2 4) (CI35) SPLIT-LIST (ABCD12345) ((A C135)(B D24) (defun split-list (L) (if (endp L) O 0) (let ((x (split-list (cdr L)))) (list

 SPLIT-LIST (BCD12345))((B D 2 4) (CI35) SPLIT-LIST (ABCD12345) ((A C135)(B D24)

SPLIT-LIST (BCD12345))((B D 2 4) (CI35) SPLIT-LIST (ABCD12345) ((A C135)(B D24) (defun split-list (L) (if (endp L) O 0) (let ((x (split-list (cdr L)))) (list 2 pts ! Complete the following definition of a Lisp function MERGE-LISTS-D in such a way that if each of L1 and L2 is a list of real numbers in descending order then (MERGE-LISTS-D LI L2) returns a list of numbers in descending order that is obtained by merging L1 and L2. Examples: 9 (MERGE-LISTS-D 05 3 1 0) 12 2 1)) (5 3 2 2 1 1 0) (MERGE-LISTS-D 03 1 0) (2 2 1)) (3 2 2 1 1 0) Case A (MERGE-LISTS-D (6 5 4 1) 9 8 2) (9 8 6 5421) Case B (MERGE-LISTS-D 06 5 4 l) (8 2))-> (8 6 5 4 2 1) DEFUN MERGE-LISTS-D (LI L2) (COND ((ENDP L1) 12) base case1 (ENDP L2) L1) base case 2 (CAR L1) (CAR L2)) (CAR Case A 11Case B L1) (T (CONS (CAR L2) (MERGE-LISTS-D 10. Suppose the Lisp variable x has been given a value as follows: (a)10.5 pt.] What is the value of (first (first x))? (b)10.5 pt.] What is the value of (rest (first x))? (CONS (MERGE-LISTS-D (setf x(17 33 44) (90 91 92 93) (5 19 29 39))) (c)10.5 pt.] What is the value of (first (d)10.5 pt.] What is the value of (e)12 pts.] (second X))? (third x)? Write a Lisp expression which does not involve any numbers, but which evaluates to (17 17 90 (33 44 5 19 29 39)) [Your expression may contain X and calls of built-in functions. Page 4 of 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!