[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enhance seq-min and seq-max
From: |
Nicolas Petton |
Subject: |
Re: Enhance seq-min and seq-max |
Date: |
Mon, 17 Jun 2019 09:46:30 +0200 |
Michael Heerdegen <address@hidden> writes:
>> I left some comments below.
>>
>> > + (if predicate
>> ^^^^^^^^^
>> What if `predicate' is nil but `key' is non-nil?
>
> Then it does nonsense. Ok, we get one more case.
If it's documented, I'm fine with it.
> I wonder if I should rather give one general definition in the
> function body and handle the four cases (KEY/PREDICATE given/not
> given) in a compiler macro. Then in compiled code there would be no
> runtime tests and it would be optimized for the respective case.
As you wish, but depending on what exactly you have in mind, it might be
better not to do it, so that `seq-min' and `seq-max' can still easily be
overwritten for custom seq types.
Nico
signature.asc
Description: PGP signature
- Re: Emacs 26.2.90 is out!, (continued)
- Re: Emacs 26.2.90 is out!, Phillip Lord, 2019/06/13
- stream.el (was: Emacs 26.2.90 is out!), Michael Heerdegen, 2019/06/13
- Re: Enhance seq-min and seq-max, Michael Heerdegen, 2019/06/15
- Re: Enhance seq-min and seq-max, Nicolas Petton, 2019/06/16
- Re: Enhance seq-min and seq-max, Michael Heerdegen, 2019/06/16
- Re: Enhance seq-min and seq-max,
Nicolas Petton <=
- Re: Enhance seq-min and seq-max, Michael Heerdegen, 2019/06/25
- Re: Enhance seq-min and seq-max, Nicolas Petton, 2019/06/26