Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!usc!skat.usc.edu!atieu From: atieu@skat.usc.edu (Anthony Tieu) Newsgroups: comp.lang.lisp Subject: help with function Message-ID: <22858@usc.edu> Date: 13 Feb 90 23:02:46 GMT Sender: news@usc.edu Organization: University of Southern California, Los Angeles, CA Lines: 14 I am a beginner at programming in LISP. Forgive me if this is too simple. I want to write a function that concatenate the 1st and 2nd word of a list in reverse order to the list itself. Example (cat '(a b c d e f g)) returns (B A A B C D E F G) This can be done by (cons (second l) (cons (first l) l)). The problem I have been facing is that I need to be able to do it with nested lists. Example (cat '(a b c d (f g h) i j (k l m) p)) should return (B A A B C D (G F F G H) I J (L K K L M) P) Can this be done recursively? Help! Anthony