# [plt-scheme] User data structures and equality

Hello all,
I want to define a bijective function f: D -> N, where D is a finite
collection of user data structures which have a known equality
procedure that given two elements of D know if they are equal or not.
Implementing this with alists is trivial, however, computing f and
f^-1 is done in linear time. The 'good' way would be hash-tables but I
can't since I have no hash-function for the data structures, only the
equality procedure [there is no obvious ordering between the user
structures since I don't really know what they are].
Any suggestions?
Cheers,
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK