On Sun, Aug 10, 2008 at 11:47 AM, Michael Feathers
<[EMAIL PROTECTED]> wrote:
>
> 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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to