[m-rev.] for review: fix hash table bug

Ralph Becket rafe at cs.mu.OZ.AU
Thu Mar 20 17:22:49 AEDT 2003


Simon Taylor, Thursday, 20 March 2003:
> 
> Estimated hours taken: 1
> Branches: main, release
> 
> NEWS:
> library/hash_table.m:
> 	Fix a bug which caused the code to attempt to access
> 	a negative numbered hash bucket.
> 
> 	Replace hash_table__search with a function, for consistency 
> 	with the rest of the interface.

That looks fine, although you might want to consider changing elem/2 to
use search/2 rather thank lookup/2 and add a function det_elem/2 that
does use lookup/2.

This would be consistent with some of the other dictionary type
interfaces.

- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list