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 RAA12942; Tue, 6 Mar 2001 17:31:56 +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 RAA12911 for ; Tue, 6 Mar 2001 17:31:54 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f26GVob29328; Tue, 6 Mar 2001 17:31:51 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA11916; Tue, 6 Mar 2001 17:31:50 +0100 (MET) Date: Tue, 6 Mar 2001 17:31:50 +0100 From: Xavier Leroy To: Chris Hecker Cc: caml-list@inria.fr Subject: Re: [Caml-list] currying... Message-ID: <20010306173150.A12522@pauillac.inria.fr> References: <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com>; from checker@d6.com on Tue, Mar 06, 2001 at 01:39:33AM -0800 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > [Curried functions, functions returning functions, and all that] > I have a feeling I'm missing something fundamental here, or else the > definition of a function internally has a field for its arity and it > just partially applies until it reaches the total arity. This is pretty much how it works internally, although the precise mechanisms used are slightly different in the bytecode interpreter and in the native-code compiler. Viewed from the outside, it maintains the illusion that every function takes only one parameter, and fun x y -> ... behaves like fun x -> (fun y -> ...). - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr