Hugh Perkins wrote:
Exactly. For this to work there needs to be the constraint that there's a
one-to-one mapping in each direction. The Bimap should have the uniqueness
promise that "Set (k, v)" gives. Yet you should be able to search on either
tuple value.

Or... have the possibility of returning a list of values.

Arguably there are two possible implementations, one that enforces
one-to-one mapping, and one which allows multiple values, in either
direction.

Terminology reminder :)
- the latter is called "(binary) relation"
  http://en.wikipedia.org/wiki/Binary_relation
- the former would be a "bijection"
  http://en.wikipedia.org/wiki/Bijective_map

Regards,
apfelmus

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to