From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by pauillac.inria.fr; Tue, 18 Oct 94 19:19:18 +0100 Received: from corton.inria.fr by pauillac.inria.fr; Tue, 18 Oct 94 13:48:39 +0100 Received: from lri.lri.fr by corton.inria.fr (5.65c8d/92.02.29) via Fnet-EUnet id AA24559; Tue, 18 Oct 1994 13:48:37 +0100 (MET) Received: from sun7c.lri.fr by lri.lri.fr, Tue, 18 Oct 1994 13:46:56 +0100 (sender-id: delapla@sun7c.lri.fr) Received: by sun7c.lri.fr, Tue, 18 Oct 94 13:46:56 +0100 Date: Tue, 18 Oct 94 13:46:56 +0100 From: Franck.Delaplace@lri.fr Message-Id: <9410181246.AA00288@sun7c.lri.fr> To: caml-list@pauillac.inria.fr Subject: Polymorphic comparison Sender: weis@pauillac.inria.fr >I think this polymorphic comparison is quite easy to implement in the >following way: >#open "hashtbl";; >let c x y = (hash x) <= (hash y);; > this kind of comparison would not be appropriate in some cases. for example when you want to use it for sorting strings c "ace" "af";; gives - : bool = false by convention, we intend to have this relation "ace" <= "af" since the comparison is defined by comparing the substrings "ac" "af"