pnathan / generic-comparability

implementation of cdr-8
http://cdr.eurolisp.org/document/8/cleqcmp.html
16 stars 2 forks source link

CDR inconsistencies #1

Closed marcoxa closed 9 years ago

marcoxa commented 9 years ago

Hi

may I point out that the implementation does not seem to fully conform with CDR8? :)

As an example, COMPARE does not return keywords... The following code would not work with another CDR8 implementation

(case (compare a b) (< (do-less-than)) (> (do-greater-than)) (/= (do-different)))

Cheers

MA

pnathan commented 9 years ago

Well, that's no good! Thanks for logging the bug.

I shall see about getting a test set and the fix in.

pnathan commented 9 years ago

@marcoxa Since you have kindly reported the error, would you review the test set in the linked patch and confirm that this indeed matches the spec (I looked at the spec, but it's helpful to have second eyes on it!).

Harleqin commented 9 years ago

You need to fix lt/gt/lte/gte too. Also (and that might be worthwhile to open as a different issue):

(test lt-compare
  (is (lt 1 2)))

fails.

pnathan commented 9 years ago

@Harleqin should be fixed now. Thanks for the heads up.