From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!small.news.tele.dk!128.39.3.168!uninett.no!Norway.EU.net!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Q: what idiom for inserting an element in a list Date: 12 Aug 2002 06:45:57 +0000 Organization: Naggum Software, Oslo, Norway Lines: 15 Message-ID: <3238123557311163@naggum.no> References: <85d6sqbug5.fsf@eta.emi.u-bordeaux.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 1029134757 26494 193.71.199.50 (12 Aug 2002 06:45:57 GMT) X-Complaints-To: abuse@KPNQwest.no NNTP-Posting-Date: 12 Aug 2002 06:45:57 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:37768 * Hrvoje Niksic | Hardly idiomatic, but my first impulse was to try something like this: | | (push 'a (nthcdr 3 *l*)) | | But Common Lisp doesn't seem to define a SETF method for NTHCDR. I | wonder why? Emacs's `cl.el' defines it, and this example works there. You would of course use (setf (cdr (nthcdr ...)) ...). -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.