Files
mercury/tests/hard_coded/bimap_set_bug.exp
Julien Fischer 99acedd027 The current implementation of of bimap.set/4 breaks if you try
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.

tests/hard_coded/bimap_set_bug.m:
tests/hard_coded/bimap_set_bug.exp:
	Add a test for the above bug.
2005-03-07 04:01:32 +00:00

25 lines
254 B
Plaintext

Forward map is:
map([
hydrogen ->
h,
helium ->
he,
lithium ->
li,
beryllium ->
be,
sodium ->
na])
Reverse map is:
map([
h ->
hydrogen,
he ->
helium,
li ->
lithium,
be ->
beryllium,
na ->
sodium])