On Thu, 16 Nov 2006, Denis Bueno wrote:
> Would it be possible to have PMap.find take an optional comparison
> parameter? I was just using PMap in some OCaml code and discovered
> that, since my keys contain Big_int.big_ints, I need to have a custom
> comparator for the one find that I do. It would have been nice to have
> that feature built-in.
Maybe I am missing something, but you already give a comparison function
when you create the map (PMap.create). This is where you would pass your
custom comparison function rather than Pervasives.compare. You can't
change it later.
Martin
--
Martin Jambon, PhD
http://martin.jambon.free.fr
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|