English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Function call with a list of parameters
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-12-13 (07:41)
From: Francois Pottier <francois.pottier@i...>
Subject: Re: [Caml-list] Function call with a list of parameters

> Sure, but if I have a function that's like this:
> let f blah = (x,y)
> let g a b x y c d = ...
> Then I need to write a new uncurry to pass x y into the right parameters in g.

Or you could keep the same definition of uncurry and write

  uncurry (g a b) (f blah) c d

So the same operator works as long as x and y are *two* *consecutive*
parameters to g. That said, I'm not sure how readable (or efficient)
this style is.

François Pottier
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