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 LAA06462; Wed, 12 Dec 2001 11:20:46 +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 LAA06621 for ; Wed, 12 Dec 2001 11:20:45 +0100 (MET) Received: from mail.info.univ-angers.fr (nes.info.univ-angers.fr [193.49.146.122]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBCAKjH08001 for ; Wed, 12 Dec 2001 11:20:45 +0100 (MET) Received: from orion.info-ua (orion.info [172.20.41.6]) by mail.info.univ-angers.fr (Postfix) with ESMTP id E6DD67ED for ; Wed, 12 Dec 2001 11:20:43 +0100 (CET) Received: from helios.info-ua (helios.info-ua [172.20.41.5]) by orion.info-ua (Postfix) with ESMTP id 76E2D175C6 for ; Wed, 12 Dec 2001 11:20:44 +0100 (MET) Received: by helios.info-ua (Postfix, from userid 759) id 1B8521FC0D; Wed, 12 Dec 2001 10:20:43 +0000 (MET) From: "Vincent Barichard MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <15383.12155.733583.353752@helios.info-ua> Date: Wed, 12 Dec 2001 11:20:43 +0100 To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Function call with a list of parameters In-Reply-To: <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com> References: <15382.13531.184819.989958@helios.info-ua> <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com> X-Mailer: VM 6.96 under Emacs 20.4.1 Reply-To: Vincent.Barichard@info.univ-angers.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thank you, I'll try another way... Vincent Chris Hecker wrote: >=20 > >I'm trying to construct a function which take two arguments : > > Arg1 : a function, Arg2 : a list of parameters for t= he Arg1. > >This function will call the function in Arg1 with Arg2 as parameters= . >=20 > This is slightly related to a feature I'd like that's easy to do in l= isp, but I don't think there's a way to do it in ML-style languages: >=20 > 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 patte= rn matching). >=20 > let f () =3D (1,2) > let g x y =3D x + y >=20 > g (? f ()) >=20 > vs. >=20 > let x,y =3D f () in > g x y >=20 > 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. >=20 > Chris >=20 >=20 > ------------------- > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inr= ia.fr/FAQ/ > To unsubscribe, mail caml-list-request@inria.fr Archives: http://cam= l.inria.fr --=20 Vincent Barichard M=E9taheuristiques et Optimisation Combinatoire Facult=E9 des Sciences d'Angers Tel : 02 41 73 52 06 ------------------- 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