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

Julien Fischer juliensf at cs.mu.OZ.AU
Mon Mar 7 12:34:20 AEDT 2005




On Mon, 7 Mar 2005, Ian MacLarty wrote:

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

The existing interface of the bimap module is pretty poorly documented.
I'll make the above change as part of another diff, as well as fix up
the rest of the documentation.

Cheers,
Julien.
--------------------------------------------------------------------------
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