help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the nth element of a list


From: Nordlöw
Subject: Setting the nth element of a list
Date: Thu, 4 Jun 2009 14:08:07 -0700 (PDT)
User-agent: G2/1.0

This simple example changes the second element in the list x:

(setq x '(a nil c))
(setcar (cdr x 'b)

How do I generalize this to a function that sets (changes) the nth
element of a list (for side effects only)?

Thanks in advance,
Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]