Ok so they are aligned. My mistake. Didn't compile the code first. I got confused by your statement:<br><br>enum X { case a, b }<br> switch X.a {<br> case .a, .b where 1 == 0:<br> print("Matched")<br> default:<br> print("Didn't")<br> }<br><br>The `where` clause only applies to the `.b`, not the `.a`, so the code will print "Matched". To make it print "Didn't", you'd have to write `case .a where 1 == 0, .b where 1 == 0`<br>------<br><br>Your example was of where used as a break condition and I was applying the same pattern to the for-in where which is a filter like case-let.<br><br>I guess this just illustrates the confusion of the where clauses. Think I'll just use guards for now.<br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 10, 2016 at 12:15 PM Brent Royal-Gordon <<a href="mailto:brent@architechies.com">brent@architechies.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Following Brent's logic that the for-in where should mimic the switch statement functionality, then this example:<br>
><br>
> for (eachKey, eachValue)<br>
> where eachValue > 5<br>
> in theKeyValuePairs {... }<br>
><br>
> Should read like:<br>
><br>
> for (eachKey, eachValue where eachValue > 5) in theKeyValuePairs {... }<br>
><br>
> And,<br>
><br>
> for (eachKey, eachValue)<br>
> where eachKey % 2 == 0 && eachValue > 5<br>
> in theKeyValuePairs {... }<br>
><br>
> Should read like:<br>
><br>
> for (eachKey where eachKey % 2 == 0, eachValue where eachValue > 5)<br>
> in theKeyValuePairs {... }<br>
<br>
I'm not sure why you say that. This compiles:<br>
<br>
switch pair {<br>
case let (key, value) where key % 2 == 0 && value > 5:<br>
print("yes")<br>
default:<br>
print("no")<br>
}<br>
<br>
While this fails to compile:<br>
<br>
switch pair {<br>
case let (key where key % 2, value where value > 5):<br>
print("yes")<br>
default:<br>
print("no")<br>
}<br>
<br>
So where are your multiple, parenthesized `where` clauses coming from?<br>
<br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
</blockquote></div>