From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA29194 for caml-redistribution@pauillac.inria.fr; Fri, 17 Mar 2000 11:28:23 +0100 (MET) Resent-Message-Id: <200003171028.LAA29194@pauillac.inria.fr> 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 IAA24294 for ; Fri, 17 Mar 2000 08:44:39 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id IAA00086; Fri, 17 Mar 2000 08:44:40 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA09839; Fri, 17 Mar 2000 08:44:37 +0100 (MET) Message-ID: <20000317084436.39519@pauillac.inria.fr> Date: Fri, 17 Mar 2000 08:44:36 +0100 From: Pierre Weis To: luther@dpt-info.u-strasbg.fr Cc: caml-list@inria.fr Subject: Re: Syntax for label, NEW PROPOSAL References: <39ADCF833E74D111A2D700805F1951EF180144F2@RED-MSG-06> <20000315121549A.garrigue@kurims.kyoto-u.ac.jp> <20000315145830.22463@pauillac.inria.fr> <20000315162628.A664@dpt-info.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <20000315162628.A664@dpt-info.u-strasbg.fr>; from Sven LUTHER on Wed, Mar 15, 2000 at 04:26:28PM +0100 Resent-From: weis@pauillac.inria.fr Resent-Date: Fri, 17 Mar 2000 11:28:23 +0100 Resent-To: caml-redistribution@pauillac.inria.fr > > Objective Caml version 2.99+10 > > > > # let sum l = List.fold_right ( + ) l 0;; > > ^^^^^ > > This expression has type int -> int -> int but is here used with type 'a list > > Is this not because the new definition of List.fold_right wants the list > first, and then only the function ? Unfortunately no: List.fold_right expects its arguments as usual: latour:~ ocaml -modern Objective Caml version 2.99+10 # List.fold_right;; - : fun:('a -> acc:'b -> 'b) -> 'a list -> acc:'b -> 'b = Friendly, -- Pierre Weis INRIA, Projet Cristal, http://pauillac.inria.fr/~weis