Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (09 Nov 2015 16:35 UTC)
Re: Comments on SRFI 128 Draft 5 (2015-11-08). John Cowan (09 Nov 2015 17:37 UTC)
Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (09 Nov 2015 22:09 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). John Cowan (10 Nov 2015 02:49 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 15:05 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx (10 Nov 2015 15:14 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 16:03 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx (10 Nov 2015 16:57 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx (10 Nov 2015 20:40 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 21:16 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 21:17 UTC)

Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). John Cowan 10 Nov 2015 02:49 UTC

Sudarshan S Chawathe scripsit:

>   (make-comparator exact-integer?
>   		   =
> 		   (lambda (i j)
>                      (and (even? i)
>                           (even? j)
>                           (< i j)))
> 		   number-hash)

This clearly violates the programmer's responsibilities section, as
I said before.  The ordering predicate is required to be asymmetric.
An asymmetric predicate is one in which, for all values of a and b,
if (pred a b) is true than (pred b a) is false.  This is obviously not
true here, so what you have is a comparator whose behavior when passed
to standard routines is undefined.

> The main question here is whether the SRFI requires comparators to
> totally order all elements accepted by their type-test predicates, or
> whether it is OK if none (1st example) or only some (2nd) are ordered.

In a word, it is not OK.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
Is not a patron, my Lord [Chesterfield], one who looks with unconcern
on a man struggling for life in the water, and when he has reached ground
encumbers him with help?        --Samuel Johnson