From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: lexicographic list comparison
Date: Mon, 12 Sep 2022 15:32:03 -0400 [thread overview]
Message-ID: <jwvedwg8k5b.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <lzk068mo44.fsf@3c22fb11fdab.ant.amazon.com> (Sam Steingold's message of "Mon, 12 Sep 2022 14:41:47 -0400")
Sam Steingold [2022-09-12 14:41:47] wrote:
>> * Stefan Monnier <zbaavre@veb.hzbagerny.pn> [2022-09-12 14:31:33 -0400]:
>> [ Tho I suspect you'll want those comparison functions to return
>> a -1/0/1 result rather than just a boolean, so you'd need an extra
>> combinator to turn such a comparison function into the kind expected
>> by `sort`. ]
>
> The predicate argument to lisp sort returns a boolean.
Indeed, but `list-compare` will likely want the other kind, hence the
need for combinators that change from kind to the other.
Stefan
next prev parent reply other threads:[~2022-09-12 19:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 19:27 lexicographic list comparison Sam Steingold
2022-09-10 9:07 ` Mattias Engdegård
2022-09-10 9:22 ` Emanuel Berg
2022-09-10 9:26 ` tomas
2022-09-12 14:45 ` Sam Steingold
2022-09-12 17:53 ` mattiase
2022-09-12 18:31 ` Stefan Monnier
2022-09-12 18:41 ` Sam Steingold
2022-09-12 19:32 ` Stefan Monnier [this message]
2022-09-12 18:35 ` Sam Steingold
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvedwg8k5b.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).