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 LAA28269; Thu, 13 Dec 2001 11:56:33 +0100 (MET) 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 LAA28749 for caml-list@pauillac.inria.fr; Thu, 13 Dec 2001 11:56:32 +0100 (MET) 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 KAA05971 for ; Wed, 12 Dec 2001 10:36:41 +0100 (MET) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBC9aSH05929 for ; Wed, 12 Dec 2001 10:36:31 +0100 (MET) Received: (from markus@localhost) by fichte.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id KAA05467; Wed, 12 Dec 2001 10:35:33 +0100 Date: Wed, 12 Dec 2001 10:35:33 +0100 From: Markus Mottl To: Chris Hecker Cc: Vincent.Barichard@info.univ-angers.fr, caml-list@inria.fr Subject: Re: [Caml-list] Function call with a list of parameters Message-ID: <20011212103533.B4949@mail4.ai.univie.ac.at> References: <15382.13531.184819.989958@helios.info-ua> <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com>; from checker@d6.com on Tue, Dec 11, 2001 at 14:59:22 -0800 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 11 Dec 2001, Chris Hecker wrote: > 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 uncurry f (x, y) = f x y > let f () = (1,2) > let g x y = x + y > > g (? f ()) uncurry g (f ()) Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- 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