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 TAA26395; Tue, 4 Nov 2003 19:14:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA26416 for ; Tue, 4 Nov 2003 19:14:45 +0100 (MET) Received: from flyingtuxman.baretta.com ([213.255.109.130]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hA4IEi125603 for ; Tue, 4 Nov 2003 19:14:44 +0100 (MET) Received: from baretta.com (flyingtuxman.baretta.com [127.0.0.1]) by flyingtuxman.baretta.com (8.12.8/8.12.8) with ESMTP id hA4IEFTe017605 for ; Tue, 4 Nov 2003 19:14:16 +0100 Message-ID: <3FA7EC77.50502@baretta.com> Date: Tue, 04 Nov 2003 19:14:15 +0100 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ocaml Subject: Re: [Caml-list] Map efficiency? References: <20031104093905.GF24152@st> In-Reply-To: <20031104093905.GF24152@st> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 implemented:01 functor:01 alex:01 alex:01 believing:98 polymorphic:01 user-defined:02 user-defined:02 module:03 module:03 wrote:03 library:03 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 ------------------- 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