Thanks so much for the response so far. To Lemming's question, this is just a theoretical question. I try comparing what I can do in Groovy with Haskell. So far I could come up with solutions but not this one. I'm not an expert on this but I'm not sure if template haskell or type class would come to rescue this situation. And if so, I wonder how it looks like.

Ed

On Fri, Aug 8, 2008 at 2:39 PM, Lemming <schlepptop@henning-thielemann.de> wrote:
Sukit Tretriluxana schrieb:

Thanks Tom and Henning for your response. Let me put the question in another way by generalizing and tweaking it a little bit.

How in Haskell that I can create a function that curries *any *other function, which receives multiple parameters, by using a the input from a list (same data type) or a tuple (mixed data type) such that it either returns another closure (if not all parameters are curried) or the final value of the computation (when all parameters are known)?

Is this a theoretical question or do you actually need this? If yes, I wonder what application it may be.