[Haskell-cafe] zip3, zip4 ... -> zipn?

Joel Koerwer joelkoerwer at gmail.com
Sat Aug 11 04:52:37 EDT 2007


The return type of zipn would have to depend on the number of
arguments. If you are satisfied with all arguments having the same
type, then you can use transpose:

zipn list1 list2 .. listn  => transpose [list1, list2, .. listn]

Can we make a polyvariadic zipn that returns a [HList]? Seems like a
neat challenge, but I'm a bit pressed for time right now. I'm afraid
it would be pretty unwieldy.

I'm looking forward to seeing solutions though. :-)

-- Joel

More information about the Haskell-Cafe mailing list