emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lexicographic list comparison


From: Sam Steingold
Subject: Re: lexicographic list comparison
Date: Mon, 12 Sep 2022 10:45:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

> * Mattias EngdegÄrd <znggvnfr@npz.bet> [2022-09-10 11:07:49 +0200]:
>
> 9 sep. 2022 kl. 21.27 skrev Sam Steingold <sds@gnu.org>:
>
>> What do you do when sorting a list of lists of numbers?
>
> Sigh deeply and write ad-hoc code for the nth time.

okay, so, I suppose, you find the `lexicographic-compare-lists' from TS
useful, right?

>> Or maybe sorting lists of lists is just such a rare op that no one has
>> ever encountered it before me?
>
> It would be useful to have a total ordering on Lisp values: for
> heterogeneous ordered collections, for simplifying multi-key sorting,
> for normalising unordered collections, etc.

I certainly have no intention of comparing strings with numbers &c.
My question was about a list of _homogeneous_ lists, and comparing to,
say, lists of numbers, is done lexicographically based on number
comparison.


-- 
Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113
https://lastingimpactpsychology.com https://steingoldpsychology.com
https://www.peaceandtolerance.org/ https://www.memritv.org
When C++ is your hammer, everything looks like a thumb.



reply via email to

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