Subject: Re: Q: what idiom for inserting an element in a list
From: Erik Naggum <>
Date: 12 Aug 2002 06:45:57 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* 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.