<div><span class="gmail_msg" style="font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">let</span><span class="gmail_msg" style="font-family:Menlo;font-variant-ligatures:no-common-ligatures"> test: [</span><span class="gmail_msg" style="font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">Int</span><span class="gmail_msg" style="font-family:Menlo;font-variant-ligatures:no-common-ligatures">]? = </span><span class="gmail_msg" style="font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">nil</span></div><div>for b in test ?? [] where b != 42 {</div><div>   Print(b)<br class="gmail_msg"><br class="gmail_msg">}</div><div><br></div><div>I don&#39;t think you need new syntax since what you want can be accomplished quite succinctly already </div><div><br></div><div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">On Sat, Feb 11, 2017 at 8:18 AM Anton Zhilin via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="m_-443928982117791095m_3708217299673513368markdown-here-wrapper gmail_msg"><pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class="gmail_msg"><code class="m_-443928982117791095m_3708217299673513368hljs m_-443928982117791095m_3708217299673513368language-swift gmail_msg" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248)"><span class="m_-443928982117791095m_3708217299673513368hljs-keyword gmail_msg" style="color:rgb(51,51,51);font-weight:bold">for</span> i <span class="m_-443928982117791095m_3708217299673513368hljs-keyword gmail_msg" style="color:rgb(51,51,51);font-weight:bold">in</span> test ?? [] {
    <span class="m_-443928982117791095m_3708217299673513368hljs-built_in gmail_msg" style="color:rgb(0,134,179)">print</span>(i)
}
</code></pre>
<p style="margin:0px 0px 1.2em!important" class="gmail_msg">For a more general solution, we could add <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" class="gmail_msg">Optional.flatten()</code> to support optional sequences:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class="gmail_msg"><code class="m_-443928982117791095m_3708217299673513368hljs m_-443928982117791095m_3708217299673513368language-swift gmail_msg" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248)"><span class="m_-443928982117791095m_3708217299673513368hljs-keyword gmail_msg" style="color:rgb(51,51,51);font-weight:bold">for</span> i <span class="m_-443928982117791095m_3708217299673513368hljs-keyword gmail_msg" style="color:rgb(51,51,51);font-weight:bold">in</span> test.flatten() {
    <span class="m_-443928982117791095m_3708217299673513368hljs-built_in gmail_msg" style="color:rgb(0,134,179)">print</span>(i)
}
</code></pre>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPmBgYHN3aWZ0PGJyPjwvZGl2PjxkaXYgY2xhc3M9Imdt
YWlsX2V4dHJhIj5mb3IgaSBpbiB0ZXN0ID8/IFtdIHs8L2Rpdj48ZGl2IGNsYXNzPSJnbWFpbF9l
eHRyYSI+Jm5ic3A7ICZuYnNwOyBwcmludChpKTwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJh
Ij59PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPmBgYDwvZGl2PjxkaXYgY2xhc3M9Imdt
YWlsX2V4dHJhIj48YnI+PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPkZvciBhIG1vcmUg
Z2VuZXJhbCBzb2x1dGlvbiwgd2UgY291bGQgYWRkIGBPcHRpb25hbC5mbGF0dGVuKClgIHRvIHN1
cHBvcnQgb3B0aW9uYWwgc2VxdWVuY2VzOjwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj48
YnI+PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPmBgYHN3aWZ0PC9kaXY+PGRpdiBjbGFz
cz0iZ21haWxfZXh0cmEiPmZvciBpIGluIHRlc3QuZmxhdHRlbigpIHs8L2Rpdj48ZGl2IGNsYXNz
PSJnbWFpbF9leHRyYSI+Jm5ic3A7ICZuYnNwOyBwcmludChpKTwvZGl2PjxkaXYgY2xhc3M9Imdt
YWlsX2V4dHJhIj59PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPmBgYDwvZGl2Pg==" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0" class="gmail_msg">​</div></div></div>
_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div></div>