a. Write a recursive LISP function that will reverse the elements of a list. (Do not use

Question:

a. Write a recursive LISP function that will reverse the elements of a list. (Do not use the built-in reverse function.) What is the complexity of your implementation? It is possible to reverse a list in linear time; can you do so?

b. Write a LISP function that will take a list nested to any depth and print the mirror image of that list. For instance, the function should have the behavior:

> (mirror ’((a

b) (c (d e))))

(((e

d) c) (b a))

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: