Rewrite C-style for loop in Swift 3 : <p>I have a C-style for loop that's no longer supported in Swift 3.  It looks something like this:</p>

<pre><code>for (var x = 0; x &lt; foo.length &amp;&amp; x &lt; bar.length; x++) {}
</code></pre>

<p>What's the equivalent of this that's available now in Swift 3?</p>
