|
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).
[Prev in Thread] | Current Thread | [Next in Thread] |