[Haskell-cafe] apply function arguments in a list

2009-10-05 Thread Michael Mossey
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

Re: [Haskell-cafe] apply function arguments in a list

2009-10-05 Thread Miguel Mitrofanov
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

Re: [Haskell-cafe] apply function arguments in a list

2009-10-05 Thread Neil Brown
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