Question: p Exercise 5.10 What is wrong with the following definition of s i mpl e - equa 1 ? (defun simple-equal (x y) Test if

p Exercise 5.10 What is wrong with the following definition of s i mpl e - equa 1 ?

(defun simple-equal (x y)

"Test if two l i s t s or atoms are equal."

;; Warning - incorrect

(or (eql x y)

(and (listp x) (listp y)

(simple-equal ( f i r s t x) ( f i r s t y))

(simple-equal (rest x) (rest y)) 1))

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 Management And Artificial Intelligence Questions!