From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by pauillac.inria.fr; Tue, 18 Oct 94 11:47:27 +0100 Received: from concorde.inria.fr by pauillac.inria.fr; Tue, 18 Oct 94 11:40:32 +0100 Received: from cri.ens-lyon.fr (cri.ens-lyon.fr [140.77.1.32]) by concorde.inria.fr (8.6.9/8.6.9) with SMTP id LAA25659 for ; Tue, 18 Oct 1994 11:40:32 +0100 Received: from lip.ens-lyon.fr (lip-gw) by cri.ens-lyon.fr (5.0/SMI-SVR4) id AA23973; Tue, 18 Oct 1994 11:40:09 +0100 Received: from champagne.ens-lyon.fr by lip.ens-lyon.fr (4.1/SMI-4.1) id AA18410; Tue, 18 Oct 94 11:40:09 +0100 Date: Tue, 18 Oct 94 11:40:09 +0100 From: Judicael.Courant@lip.ens-lyon.fr (Judicael Courant) Message-Id: <9410181040.AA18410@lip.ens-lyon.fr> Received: by champagne.ens-lyon.fr (4.1/SMI-4.1) id AA21878; Tue, 18 Oct 94 11:40:24 +0100 To: caml-list@pauillac.inria.fr Cc: John.Harrison@cl.cam.ac.uk Subject: Polymorphic comparison Sender: weis@pauillac.inria.fr Hello, I think this polymorphic comparison is quite easy to implement in the following way: #open "hashtbl";; let c x y = (hash x) <= (hash y);; #infix "c";; #3 c true;; - : bool = true #[ "hello" ; "world" ] c 3.14159;; - : bool = false But, as Pierre Weis, I am wondering what to do with such a function... Maybe let c (x:'a) (y:'a) = (hash x) <= (hash y);; would be more suitable ? -- Judicaël COURANT tel. : 72 72 85 82 ENSL - LIP email : Judicael.Courant@ens-lyon.fr 46, allée d'Italie 69364 Lyon cedex 07 --