Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe 09 Nov 2015 22:09 UTC
John Cowan wrote: > Sudarshan S Chawathe scripsit: > > * Are comparators that reflect a partial ordering of objects > > permitted? The definition of ordering predicate seems to permit it. > > The programmer responsibilities rule that out. If a < b, then it's > forbidden for b < a, by the definition of mathematical asymmetry. I think my earlier comment about partial orders was a bit vague. Let me try again with a more concrete situation. Are the following allowed by the SRFI? (make-comparator (lambda args #t) equal? (lambda args #f) #f) (make-comparator exact-integer? = (lambda (i j) (and (even? i) (even? j) (< i j))) number-hash) 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. Regards, -chaw