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 XAA32688; Tue, 11 Dec 2001 23:55:39 +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 XAA32690 for ; Tue, 11 Dec 2001 23:55:38 +0100 (MET) Received: from smtp5-cm.mail.eni.net (smtp5-cm.mail.eni.net [216.133.226.138]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBBMtb123035 for ; Tue, 11 Dec 2001 23:55:37 +0100 (MET) Received: from checkerlap.d6.com (node-d8e9cca2.powerinter.net [216.233.204.162]) by smtp5-cm.mail.eni.net (8.9.3/8.9.3) with ESMTP id OAA22713; Tue, 11 Dec 2001 14:55:27 -0800 Message-Id: <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com> X-Sender: checker@arda.pair.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 11 Dec 2001 14:59:22 -0800 To: Vincent.Barichard@info.univ-angers.fr, caml-list@inria.fr From: Chris Hecker Subject: Re: [Caml-list] Function call with a list of parameters In-Reply-To: <15382.13531.184819.989958@helios.info-ua> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >I'm trying to construct a function which take two arguments : > Arg1 : a function, Arg2 : a list of parameters for the Arg1. >This function will call the function in Arg1 with Arg2 as parameters. This is slightly related to a feature I'd like that's easy to do in lisp, but I don't think there's a way to do it in ML-style languages: I have a function that returns a tuple, and a function that takes two curried parameters. I'd like to pass the results of the first to the second, without having to break up the tuple with fst and snd (or pattern matching). let f () = (1,2) let g x y = x + y g (? f ()) vs. let x,y = f () in g x y With lisp you can just "apply" and it works. There's no way in caml to spread the arguments into a curried function application, however. Chris ------------------- 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