<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yup, I thought it zips them (creates pairs of (1, 1), (2, 2), (3, 3), etc.).<br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font color="#929292" class=""><br class="Apple-interchange-newline">Pozdrawiam – Regards,</font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font color="#929292" class="">Adrian Kashivskyy</font></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">Wiadomość napisana przez Alex Popov via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> w dniu 17.12.2015, o godz. 22:50:</div><br class="Apple-interchange-newline"><div class=""><div class="">Data of 1: I misunderstood the second comprehension until I saw it written in Swift, and I do know about list comprehensions from Erlang. <div class=""><div class=""><br class=""></div><div class="">I agree that this seems to contradict "clarity over brevity".</div><div class=""><br class=""><br class="">—<div class="">Alex Popov Jr.</div><div class="">Principal iOS Developer | Shelfie</div><br class=""><br class=""></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Dec 17 2015, at 12:44 pm, Amir Michail via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:
<br class="">
<meta content="text/html charset=utf-8" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 17, 2015, at 3:27 PM, Adrian Kashivskyy <<a href="mailto:adrian.kashivskyy@me.com" class="">adrian.kashivskyy@me.com</a>> wrote:</div><br class=""><div class=""><meta content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Amir, your proposal contradicts "clarity over brevity" principle. As pointed by Liam all those things are fairly easy to do without any major complexity.<br class=""><div class="">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I think the comprehensions are very clear though.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Pozdrawiam – Regards,</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Adrian Kashivskyy</div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">Wiadomość napisana przez Amir Michail via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> w dniu 17.12.2015, o godz. 17:26:</div><br class=""><div class=""><div class="">Python examples:<br class=""><br class="">l = [x*x for x in range(10)] // list comprehension<br class=""><br class="">l2 = [(x,y) for x in range(10) for y in range(10) if x + y < 8] // another list comprehension<br class=""><br class="">g = (x*x for x in range(10)) // generator comprehension<br class=""><br class="">d = {x:x*x for x in range(10)} // dictionary comprehension<br class=""><br class=""><br class="">I think most programmers would like using these. They are concise and easy to understand.<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=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=CmwAv3oRa0AH4Hd1bWC6X-2BzbhPqo1YEo6mPHEujr90sblMts0lyHPlhqzvj-2Fp-2BC5OEMkczNuE6qNGof856voE-2BZnswBliGIoLaS-2BjycYlE0gnxN5cGJ98YQMEUtmMgZFbBpSh1ddBJSm21Gb1SvtRV0-2BUl5I9pgd4gfaSj3QH9liTjcXY0B-2FKLe-2BGskz0t2ZkdLzgQYgLttL6QnIT6UrERxZgyT9dQfFRCqL1CVFzAU-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</blockquote>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=Q0Y0L54uOhrrHtFzGFlMmzHCkni7p1uaN05dut7Y5S44zVlGrm4wPnSzyc9aGgjFxgwW5xEFCuQ-2Brdkaoz76Ibfbyrso-2B6cegJZKkrUMlHyj-2FGJ-2F169jsUgVLendkiohkOLRyT9bpmmSnKCBxTpUE1OlFnrM2pxkGHbvcZPjATE2SJgaH79psfoiGQQZPLxpeaV7fUVLgrcdoq2gy4oShTx9JAVfpCeW-2Fj4HgfYR1qM-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<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></blockquote></div><br class=""></body></html>