Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

computer science Question The equal_lists function contains a COND expression wi

ID: 3562302 • Letter: C

Question

computer science

Question

The equal_lists function contains a COND expression with four parts, the last of which is

(T NIL)

Give values for lis1 and lis2 that will cause this part to be reached. If no such values exist, explain why not.

; LISP Example function

; The following code defines a LISP predicate function

; that takes two lists as arguments and returns True

; if the two value lists are equal, and NIL (false) otherwise

  (DEFUN equal_lists ( lis1 lis2)

     (COND

                ((ATOM list1) (EQ lis1 lis2))

((ATOM lis2) NIL)

((equal_lists   (CAR list1) (CAR lis2))

                     (equal_lists (CDR lis1) (CDR lis2)))

(T NIL)

          )

)

Thank you in advance!

Explanation / Answer

Some parameters which influence the encoding and decoding of symbols are:

[variable] *json-symbols-package*

The package where JSON Object keys etc. are interned. Default keyword, nil = use current *package*.