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

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

RE: [External] : Re: Chopping the last element of a list


From: Drew Adams
Subject: RE: [External] : Re: Chopping the last element of a list
Date: Fri, 29 Apr 2022 03:33:24 +0000

> I would do that like
> 
> (let ((last2 (last my-list 2)))
>   (prog1 (cons (cadr last2) my-list) (setcdr last2 nil)))

Yes.  I was just showing essentially the code
that `last' uses (in the example I gave).



reply via email to

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