bad example Pierpaolo Bernardi (22 Feb 2024 12:29 UTC)
Re: bad example Arthur A. Gleckler (22 Feb 2024 15:58 UTC)
Re: bad example John Cowan (28 Feb 2024 17:23 UTC)
Re: bad example Arthur A. Gleckler (29 Feb 2024 00:22 UTC)
Re: bad example Pierpaolo Bernardi (01 Mar 2024 13:31 UTC)
Re: bad example Arthur A. Gleckler (02 Mar 2024 01:21 UTC)

bad example Pierpaolo Bernardi 22 Feb 2024 12:29 UTC

Hello,

the SRFI defines: "The hash function takes an object and returns an
exact non-negative integer."

Then gives this example:
"(make-comparator real? = < (lambda (x) (exact (abs x)))) will return
a comparator expressing the natural ordering of real numbers and a
plausible (but not optimal) hash function."

This hash function however for most reals will not return an integer.

HTH