[m-rev.] for review: fix a bug in bimap.set/4

Ian MacLarty maclarty at cs.mu.OZ.AU
Mon Mar 7 12:31:01 AEDT 2005


Julien Fischer wrote:
> Estimated hours taken: 2
> Branches: main, release
> 
> The current implementation of of bimap.set/4 breaks if you try
> to set a Key-Value pair that have already been mapped to each other.
> 
> library/bimap.m:
> 	Fix the implementation of bimap.set/4.
> 

I wonder if it might be worth documenting in the interface how 
bimap.set/4 maintains the one-to-one correspondence between the keys and 
values.  I.e. that if you set the key-value pair (K, V) then this will 
replace the two pairs (K1, V) and (K, V1) if they are present.

Ian.
--------------------------------------------------------------------------
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