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

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

Re: Replace element in list


From: tomas
Subject: Re: Replace element in list
Date: Mon, 2 Sep 2019 13:05:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Sep 02, 2019 at 01:03:21PM +0200, Michael Heerdegen wrote:
> tomas@tuxteam.de writes:
> 
> > In Emacs Lisp you could try:
> >
> >   (setcar (nthcdr 3 foo) 'mud)
> 
> Another way to write that is
> 
>     (setf (nth 3 foo) 'mud)

Yes, much nicer. I always forget about setf. Thanks for the
reminder!

Cheers
-- tomás

Attachment: signature.asc
Description: Digital signature


reply via email to

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