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 KAA05629; Wed, 12 Dec 2001 10:33:57 +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 KAA05933 for ; Wed, 12 Dec 2001 10:33:55 +0100 (MET) Received: from draco ([62.30.67.37]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBC9XsH05840 for ; Wed, 12 Dec 2001 10:33:55 +0100 (MET) Received: from jim by draco with local (Exim 3.32 #1 (Debian)) id 16E5jS-0005Ye-00; Wed, 12 Dec 2001 09:31:18 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Jim Farrand Message-Id: <200112120921.37250@farrand.net> To: Vincent.Barichard@info.univ-angers.fr Subject: Re: [Caml-list] Function call with a list of parameters Date: Wed, 12 Dec 2001 09:31:17 +0000 X-Mailer: KMail [version 1.3.2] References: <15382.13531.184819.989958@helios.info-ua> In-Reply-To: <15382.13531.184819.989958@helios.info-ua> Cc: caml-list@inria.fr MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tuesday 11 December 2001 16:31, you wrote: > 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. I'm not much of an OCaml expert, but I suspect that what you are trying to do is not possible. Imagine that you had defined such a function, and want to call it like this: > myFunctionCall f l What would be the type of f? It depends on l: If l is [], f has type 'a If l is [1], f has type int -> 'a If l is [1; 2], f has type int -> int -> 'a etc. I don't think OCaml can properly type a function like you are describing. Regards, Jim ------------------- 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