[r6rs-discuss] Hash function return value constraints

leppie xacc.ide at gmail.com
Fri Apr 3 04:34:14 EDT 2009


Hi

The R6RS states:

*"Hash-function* should accept a key as an argument and should return a
non-negative exact integer object."

This only the only place that mentions a non-negative integer.

What is the rationale for making the hash value non-negative?

By constraining the output, you are limiting the usage of fixnums and might
have to resort to big nums.

Cheers

leppie

-- 
http://codeplex.com/IronScheme
http://xacc.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r6rs.org/pipermail/r6rs-discuss/attachments/20090403/3064798a/attachment.htm 


More information about the r6rs-discuss mailing list