Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!psuvax1!psuvm!cunyvm!jefhc From: JEFHC@CUNYVM Newsgroups: comp.lang.lisp Subject: novice question Message-ID: <90285.160549JEFHC@CUNYVM.BITNET> Date: 12 Oct 90 20:05:49 GMT Organization: City University of New York/ University Computer Center Lines: 20 I realize that this is a very elementary question, but after banging my head against the wall for several days I still can't find an answer. I am trying to write a procedure that will produce the mirror image of a list, (mirror '((a b)(c(d e)))) gives ((( e d)c)(a b) but (defun mirror (l) (cond((null l)nil) ((atom l)l) (cons (mirror(rest l))(mirror(first l)))))) yields ((NIL (NIL (NIL . E) .D) . C (NIL . B) .A) I've tried every condition under the sun, and have managed to get rid of the .'s (by changin (atom l)(list l) ), but not the NILS. Thanks for your help. .... Julie