In many other languages, to zip a number of lists together means to take something like
((x1, x2, x3, x4), (y1, y2, y3, y3))
and turn it into
((x1, y1), (x2, y2), (x3, y3), (x4, y4))
This of course generalises to lists
- with more than 2 sublists,
- whose sublists are not of length 4, and
- whose sublists may have entirely different lengths.
I find myself doing this a lot, so I thought I'd share the solution.