[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: |
Thu, 01 Dec 2022 18:25:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Michael Heerdegen wrote:
> Emanuel Berg <incal@dataswamp.org> writes:
>
>> (defmacro push-last (elem lst)
>> "Push ELEM to be the last element of LST.
>> Beware that this is O(n) while `push' is O(1)."
>> (if (and (symbolp lst)
>> (not (symbol-value lst)) )
>> (list 'setq lst `(list ,elem))
>> (list 'nconc lst `(list ,elem)) ))
>
> Do you really want to test the `symbol-value' at compile (macro
> expansion) time?
I don't know, why not?
--
underground experts united
https://dataswamp.org/~incal
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/01
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/01
- Re: Easy to add with push but not to the end of a list, Michael Heerdegen, 2022/12/01
- 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, Michael Heerdegen, 2022/12/03
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/05
- Re: Easy to add with push but not to the end of a list, Michael Heerdegen, 2022/12/05
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/05
- Re: Easy to add with push but not to the end of a list, Michael Heerdegen, 2022/12/05
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/06
- Re: Easy to add with push but not to the end of a list, Michael Heerdegen, 2022/12/06
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/06
- Re: Easy to add with push but not to the end of a list, Michael Heerdegen, 2022/12/08
- Re: Easy to add with push but not to the end of a list, Emanuel Berg, 2022/12/29