Suppose that l1 is the list a b c d and l2 is the list d f


Please verify that I solve the this practice problem correctly. Thanks for the help

Suppose that L1 is the list (A (B C) (D)) and L2 is the list (D (F)). Find the value of each of the following LISP expressions:

(a) (CONS 9CAR L2) (CDR L1))

MY ANSWER IS:(CAR(D(F))(CDR(A(BC)(D))

(D(F))(CDR(A(BC)(D))

(b) (LIST (CONS L1 L2))

MY ANSWER IS: (CONS(A(BC)(D))(D(F))))

(A(BC)(D(D)F))

(c) (CDR (LIST L1 'E L2))

MY ANSWER IS: (A(BC)(D)) E (D(F))

Solution Preview :

Prepared by a verified Expert
Business Management: Suppose that l1 is the list a b c d and l2 is the list d f
Reference No:- TGS02877441

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)