[Top][All Lists]

[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.


Attachment: signature.asc
Description: PGP signature

reply via email to

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