
11 Aug
2008
11 Aug
'08
3:06 p.m.
On Sun, Aug 10, 2008 at 11:47 AM, Michael Feathers
unlist3 :: (a -> a -> a -> b) -> [a] -> b unlist3 f (x:y:z:xs) = f x y z
Oleg has written about this. Be careful, its easy to overdose on: "Functions with the variable number of (variously typed) arguments" http://okmij.org/ftp/Haskell/types.html#polyvar-fn
I was also wondering whether the function can be generalized to N or whether this is just one of those edges in the type system that you can't abstract over.
With template haskell I don't think that exists. Justin