From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA12417; Wed, 5 Nov 2003 02:09:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA12692 for ; Wed, 5 Nov 2003 02:09:45 +0100 (MET) Received: from smtp.siren.ocn.ne.jp (siren.ocn.ne.jp [211.129.13.170]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hA519h120961 for ; Wed, 5 Nov 2003 02:09:43 +0100 (MET) Received: from PWARP (p2095-ipad01kyoto.kyoto.ocn.ne.jp [61.207.253.95]) by smtp.siren.ocn.ne.jp (Postfix) with SMTP id 248FB1C61; Wed, 5 Nov 2003 10:09:40 +0900 (JST) Message-ID: <008501c3a339$7b9e4860$6f00a8c0@PWARP> From: "Nicolas Cannasse" To: "Alex Baretta" , "ocaml" References: <20031104093905.GF24152@st> <3FA7EC77.50502@baretta.com> Subject: Re: [Caml-list] Map efficiency? Date: Wed, 5 Nov 2003 10:09:37 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 implemented:01 functor:01 extlib:01 sourceforge:01 mli:01 cannasse:01 nicolas:01 nicolas:01 alex:01 believing:98 polymorphic:01 user-defined:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > Map depends on keys to be ordered. This in turn requires to allow for a > > user-defined order: assume sets as keys that are implemented by > > unordered lists. Different lists can represent the same set. Hence, it > > must be possible to provide a user-defined order that would treat those > > lists as equal. The functor argument of Map contains the compare() which > > does just that. > > The order function could just as easily be passed as a parameter to all > functions working on the map. There is no reason not to have a > polymorphic version of the Map module in the standard library. Am I > wrong in believing that someone out there wrote such a module already? > > Alex There is one : module PMap , which is part of the ExtLib CVS : http://sourceforge.net/projects/ocaml-lib Since it's been added recently, there is no mli yet. Nicolas Cannasse ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners