Question: LISP programming Write and run a recursive Lisp function called my-replace which takes three S-expressions (call them S1, S2, and S3). It replaces S2 by

LISP programming

LISP programming Write and run a recursive Lisp function called my-replace which

Write and run a recursive Lisp function called my-replace which takes three S-expressions (call them S1, S2, and S3). It replaces S2 by S3 whenever S2 occurs as a first level element in Si. Assume that S1 is a list. S2 and S3 may be either atoms or lists. For instance: (my-replace '(A (BC)D) '(B C) 'X) (A X D)

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!