2. Write a function called reverse, of one argument which
is a list, which returns the items in the list in reverse order,
For example,
(reverse '(a b d))
should return: (d b a)
(defun my-reverse (list)
(let ((x nil))
(loop for i in list do
(push i x)
finally (return x))))COMMON-LISP-USER>
(my-reverse '(a b d))
(D B A)
Users browsing this forum: Bing [Bot] and 1 guest