<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">It might be worth noting that, in the meantime, you can nest zips as a workaround without having to define zip for n-tuples:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(186, 45, 162);" class="">let</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> integers = [</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">1</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">2</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">3</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">4</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">5</span><span style="font-variant-ligatures: no-common-ligatures;" class="">]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(186, 45, 162);" class="">let</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> strings = [</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"a"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"b"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"c"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"d"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"e"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(186, 45, 162);" class="">let</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> doubles = [</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">1.0</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">2.0</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">3.0</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">4.0</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(39, 42, 216);" class="">5.0</span><span style="font-variant-ligatures: no-common-ligatures;" class="">]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(186, 45, 162);" class="">for</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> (integer, (string, double)) </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(186, 45, 162);" class="">in</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(62, 30, 129);" class="">zip</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(79, 129, 135);" class="">integers</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(62, 30, 129);" class="">zip</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(79, 129, 135);" class="">strings</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(79, 129, 135);" class="">doubles</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)) {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(62, 30, 129);" class="">print</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures;" class="">integer</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">) </span><span style="font-variant-ligatures: no-common-ligatures;" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures;" class="">string</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">) </span><span style="font-variant-ligatures: no-common-ligatures;" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures;" class="">double</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">)"</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">}</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div><blockquote type="cite" class=""><div class="">On Nov 9, 2016, at 9:29 PM, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">on Wed Nov 09 2016, Alexander Momchilov <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">This stack overflow question<br class=""><<a href="http://stackoverflow.com/q/40517760/3141234" class="">http://stackoverflow.com/q/40517760/3141234</a>> asks about using zip<br class="">with more than 3 sequences. I referred the OP to the generics<br class="">manifesto<br class=""><<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#variadic-generics" class="">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#variadic-generics</a>>,<br class="">which describes the (current) lack of varadiac generics, which<br class="">prohibits the ability to express (in pure Swift) the ability to write<br class="">ZipSequence for an arbitrary number of sequences.<br class=""><br class="">I wrote up a (rough) gyb template for creating<br class="">ZipSequences. <<a href="https://github.com/amomchilov/ZipNsequence/blob/master/ZipNSequence.swift.gyb" class="">https://github.com/amomchilov/ZipNsequence/blob/master/ZipNSequence.swift.gyb</a>><br class="">Is there any interest in adding something like this to the stdlib?<br class=""></blockquote><br class="">Yes, it's always been part of the (eventual) plan, so it's cool to see.<br class="">It's out of scope for phase 1 of the Swift 4 planning work, but when<br class="">phase 2 comes along you should submit a proposal!<br class=""><br class="">-- <br class="">-Dave<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></body></html>