[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Easy to add with push but not to the end of a list
From: |
Emanuel Berg |
Subject: |
Re: Easy to add with push but not to the end of a list |
Date: |
Mon, 28 Nov 2022 23:46:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Heime wrote:
>>> Although it is easy to add to a list using push, it
>>> currently looks hideous to be able to add to the end of
>>> a list.
>>
>> That's because adding to the end of a Lisp list is
>> a bad idea.
>
> The bad idea comment disregards necessity.
(defmacro push-last (elem lst)
(if (and (symbolp lst)
(not (symbol-value lst)) )
(list 'setq 'lst `(list ,elem))
(list 'nconc lst `(list ,elem)) ))
--
underground experts united
https://dataswamp.org/~incal
- Re: Easy to add with push but not to the end of a list, (continued)
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/11/30
- Re: Easy to add with push but not to the end of a list, tomas, 2022/11/29
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/11/30
- Re: Easy to add with push but not to the end of a list, Marcin Borkowski, 2022/11/29
- Re: Easy to add with push but not to the end of a list, tomas, 2022/11/29
- Re: Easy to add with push but not to the end of a list, Dr Rainer Woitok, 2022/11/29
- Of cars and mice [was: Easy to add with push but not to the end of a list], tomas, 2022/11/29
- Re: Of cars and mice [was: Easy to add with push but not to the end of a list], Emanuel Berg, 2022/11/30
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/11/30
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/11/30
- Re: Easy to add with push but not to the end of a list,
Emanuel Berg <=
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/11/30
Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/11/28
Re: Easy to add with push but not to the end of a list, Dr Rainer Woitok, 2022/11/29
Re: Easy to add with push but not to the end of a list, Michael Heerdegen, 2022/11/30