[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sorted?
From: |
tomas |
Subject: |
Re: sorted? |
Date: |
Mon, 9 Dec 2024 20:22:50 +0100 |
On Mon, Dec 09, 2024 at 07:14:10PM +0000, Stefan Schmiedl wrote:
> ------ Original Message ------
> > From tomas@tuxteam.de
[...]
> > This seems the intention. But since it accepts an arbitrary "less"
> > function, it ends being iffy. How do you go from some "less" to a
> > "less-or-equal" without running into undecidability dark alleys?
> >
> Well, the iffyness is managed by the programmer, who chooses the
> comparison function.
>
> Do you have an example of such an iffy set?
I think Mikael just posted one, in another arm of this thread
(comparing pairs where only the car is relevant, i.e.
(lambda (p1 p2) (< (car p1) (car p2)))
Then you'd need a corresponding equal, because otherwise you
end up with things which are neither less nor equal nor greater,
i.e. the ordering isn't total, which is bad for sorting :)
Cheers
--
t
signature.asc
Description: PGP signature
- Re: sorted?, (continued)
- Re: sorted?, tomas, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re: sorted?, tomas, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re[2]: sorted?, Stefan Schmiedl, 2024/12/09
- Re: sorted?, tomas, 2024/12/09
- Re[2]: sorted?, Stefan Schmiedl, 2024/12/09
- Re: sorted?,
tomas <=
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re: sorted?, tomas, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- RE: sorted?, Maxime Devos, 2024/12/12
- RE: sorted?, Maxime Devos, 2024/12/12
- RE: sorted?, Maxime Devos, 2024/12/12
- RE: sorted?, Maxime Devos, 2024/12/12
RE: sorted?, Maxime Devos, 2024/12/12