You can't do this in Haskell, if you try to type the function
carefully, you'll know the reason.

Shiqi
On 5/18/06, Aditya Siram <[EMAIL PROTECTED]> wrote:
I am trying to write a function 'applyArguments' which takes a function and
a list and recursively uses element each in the list as an argument to the
function. I want to do this for any function taking any number of arguments.

applyArgument f (arg) = f arg
applyArgument f (arg:args) = applyArgument (f arg) args

This has failed in Hugs, so my question is: Can I conceptually do this? If
so, what is the type signature of this function?

Deech


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to