On 05/08/07, Frank Buss <[EMAIL PROTECTED]> wrote: > Is it possible to write functions with an arbitrary number of arguments? > Would be nice if the average function would accept any number of pixel > values.
I think it's possible in some sense, because the Haskell interpretation of printf() works in the normal way. But there might be a bit of voodoo involved. Easier is to just pass a list of arguments to calculate over. (The following is neither correct nor fast...) > avg xs = sum xs `div` length xs Cheers, D. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe