all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Petton <nicolas@petton.fr>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Enhance seq-min and seq-max
Date: Mon, 17 Jun 2019 09:46:30 +0200	[thread overview]
Message-ID: <87blywac2x.fsf@petton.fr> (raw)
In-Reply-To: <87sgs9glqb.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

Michael Heerdegen <michael_heerdegen@web.de> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2019-06-17  7:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 20:09 Emacs 26.2.90 is out! Nicolas Petton
2019-06-12 21:31 ` Nicolas Petton
2019-06-13 21:35 ` Phillip Lord
2019-06-13 23:03 ` stream.el (was: Emacs 26.2.90 is out!) Michael Heerdegen
2019-06-14  7:15   ` Nicolas Petton
2019-06-15  0:25     ` Enhance seq-min and seq-max (was: stream.el) Michael Heerdegen
2019-06-15  6:27       ` Eli Zaretskii
2019-06-15 23:00         ` Enhance seq-min and seq-max Michael Heerdegen
2019-06-16  2:38           ` Eli Zaretskii
2019-06-15 23:46       ` Michael Heerdegen
2019-06-16 20:11         ` Nicolas Petton
2019-06-16 23:21           ` Michael Heerdegen
2019-06-17  7:46             ` Nicolas Petton [this message]
2019-06-25 21:22               ` Michael Heerdegen
2019-06-26  7:52                 ` Nicolas Petton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blywac2x.fsf@petton.fr \
    --to=nicolas@petton.fr \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.