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 RAA25338; Mon, 16 Jul 2001 17:43:28 +0200 (MET DST) 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 RAA25239 for ; Mon, 16 Jul 2001 17:43:27 +0200 (MET DST) Received: from mailgw1.fhg.de (mailgw1.fhg.de [153.96.1.2]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6GFhOT04930 for ; Mon, 16 Jul 2001 17:43:25 +0200 (MET DST) Received: from ilt.fhg.de (ilt.ilt.fhg.de [153.96.180.2]) by mailgw1.fhg.de (8.11.1/8.11.1) with ESMTP id f6GFhGN02805 for ; Mon, 16 Jul 2001 17:43:17 +0200 (MET DST) Received: from eent359 (iltpc198.ilt.fhg.de [192.102.148.198]) by ilt.fhg.de (8.9.3/8.9.3) with ESMTP id RAA07703 for ; Mon, 16 Jul 2001 17:43:11 +0200 (MET DST) From: "Rolf Wester" To: caml-list@inria.fr Date: Mon, 16 Jul 2001 17:43:11 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: [Caml-list] Sample code doesn't work Message-ID: <3B5327AF.24111.5E50BF6@localhost> X-mailer: Pegasus Mail for Win32 (v3.12cDE) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I have a problem with the following simple example: let rec make_account wert0 = let wert = wert0 in let add wert_ = make_account (wert+.wert_) in let sub wert_ = make_account (wert-.wert_) in let get () = wert in (add, sub, get);; When trying to evaluate this I get the error message: This expression has type (float -> 'a * 'b * 'c) * (float -> 'a * 'b * 'c) * (unit -> float) but is here used with type 'a * 'b * 'c How can I make this work? Rolf Wester ------------------------------------- Rolf Wester wester@ilt.fhg.de ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr