If I have a list containing the arguments I want to give to a function, is
there a general way to supply those arguments in a compact syntax?
In other words, I could have
args = [1,2,3]
f x y z = ...
I would write
t = f (args!!0) (args!!1) (args!!2)
but there may be a neater, more general
t = let [x,y,z] = args in f x y z
Michael Mossey wrote:
t = f (args!!0) (args!!1) (args!!2)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Michael Mossey wrote:
If I have a list containing the arguments I want to give to a
function, is there a general way to supply those arguments in a
compact syntax?
In other words, I could have
args = [1,2,3]
f x y z = ...
I would write
t = f (args!!0) (args!!1) (args!!2)
but there may be