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 MAA27904; Mon, 16 Sep 2002 12:19:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA28517 for caml-list@pauillac.inria.fr; Mon, 16 Sep 2002 12:19:22 +0200 (MET DST) 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 FAA23717 for ; Mon, 16 Sep 2002 05:45:52 +0200 (MET DST) Received: from star2.baremetal.com (star2.baremetal.com [216.86.113.248]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g8G3jp928625 for ; Mon, 16 Sep 2002 05:45:51 +0200 (MET DST) Received: from akiv48cdy59dc.bc.hsia.telus.net (akiv48cdy59dc.bc.hsia.telus.net [142.179.98.88] (may be forged)) by star2.baremetal.com (8.12.4/8.12.4) with ESMTP id g8G3mnU8010876 for ; Sun, 15 Sep 2002 20:48:49 -0700 Date: Sun, 15 Sep 2002 20:44:19 -0700 Subject: [Caml-list] function polymorphic in number of arguments? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) From: Quetzalcoatl Bradley To: Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: <94F2CE6A-C926-11D6-828F-0030657680C6@blackfen.com> X-Mailer: Apple Mail (2.543) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Is it possible to make a function of N arguments (3 or more), the first two are functions of N-2 arguments, and the function calls the first two functions passing its remaining arguments to each of the first two functions. For example let f1 x = print_string (x ^ "1\n");; let f2 x = print_string (x ^ "2\n");; let f a b x = ??? What goes here ??? f f1 f2 "abc";; result in abc1 abc2 The trick part is I want the same function f to work if I pass it f1 and f2 of 2 arguments and pass 4 arguments to f, f1, f2, and two others that get passed to f1 and f2. Thanks for your time, Quetzalcoatl Bradley qbradley@blackfen.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners