Re: sorted?
| Newsgroups | gmane.lisp.guile.user |
|---|---|
| Message-ID | <Z1dDij/nRy/[email protected]> |
On Mon, Dec 09, 2024 at 07:14:10PM +0000, Stefan Schmiedl wrote: > ------ Original Message ------ > > From [email protected] [...] > > 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
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZ1dDgwAKCRAFyCz1etHa Rln9AJ9XsOZ0ap2W52UxSSDDImxDxXOjnQCfVa/PlpKobfEfsTcH9jtCKb2xJHU= =HT3n -----END PGP SIGNATURE-----