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

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

Re: Setting the nth element of a list


From: Lennart Borgman
Subject: Re: Setting the nth element of a list
Date: Fri, 5 Jun 2009 00:35:06 +0200

Use nthcdr

On Thu, Jun 4, 2009 at 11:08 PM, Nordlöw <per.nordlow@gmail.com> wrote:
> 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]