
5 Aug
2007
5 Aug
'07
7:16 p.m.
On 05/08/07, Frank Buss
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.