Add Various Zip-Related Types and Operations

I think this would make for a great proposal.

Personally, I'm a bit skeptical of namespacing this kind of thing. I'd prefer just leaving the types at the top level.

It would be good to add to this the creation of collection versions of Zip as well. Two forward collections zipped together can be forward collections. Two random-access collections can be random access (via conditional conformance). Note, they both need to be random-access to go beyond forward-only because you need to be able to compute length in constant time to know which is longer in order to make e.g. zipped.last computable in constant time.

1 Like