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 RAA26438; Tue, 11 Dec 2001 17:31:33 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA26623 for ; Tue, 11 Dec 2001 17:31:32 +0100 (MET) Received: from mail.info.univ-angers.fr (nes.info.univ-angers.fr [193.49.146.122]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id fBBGVS907552 for ; Tue, 11 Dec 2001 17:31:32 +0100 (MET) Received: from orion.info-ua (orion.info [172.20.41.6]) by mail.info.univ-angers.fr (Postfix) with ESMTP id 972537DC for ; Tue, 11 Dec 2001 17:31:23 +0100 (CET) Received: from helios.info-ua (helios.info-ua [172.20.41.5]) by orion.info-ua (Postfix) with ESMTP id F1A85175C6 for ; Tue, 11 Dec 2001 17:31:23 +0100 (MET) Received: by helios.info-ua (Postfix, from userid 759) id A26DB1FC0D; Tue, 11 Dec 2001 16:31:23 +0000 (MET) From: "Vincent Barichard MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <15382.13531.184819.989958@helios.info-ua> Date: Tue, 11 Dec 2001 17:31:23 +0100 To: caml-list@inria.fr Subject: [Caml-list] Function call with a list of parameters 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 Hello, I'm trying to construct a function which take two arguments : =09=09Arg1 : a function, Arg2 : a list of parameters for the Arg1. This function will call the function in Arg1 with Arg2 as parameters. For example : If I have the function =09 let fourAdd x y z w =3D x + y + z + w;; I'll can execute it with the next command line : =09 myFunctionCall fourAdd [1 ; 2 ; 3 ; 4];; The hypothesis are : - The Arg1 function is in curried form and all its arguments have the s= ame type. - The length of Arg2 is exactly the number of arguments needed by Arg1 I've tried the following code, but it doesn't work because the argument= nomProcedure has a different type at each call. let rec runAlgoWithArgs nomProcedure liste_Args =3D =09match liste_Args with =09=09[] -> raise Exit =09|=09[x] -> nomProcedure x =09|=09x::xs -> runAlgoWithArgs (nomProcedure x) xs Is anybody has an idea ?? Thanks for your help, Vincent --=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