span>(<span class='ident'>x</span>) <span class='op'>=</span> <span class='ident'>option</span> {
    <span class='ident'>foo</span>(<span class='ident'>x</span>);
} <span class='kw'>else</span> {
    <span class='ident'>bar</span>();
}</pre>

<h2 id='while-let' class='section-header'><a href='#while-let'><code>while let</code></a></h2>
<!-- In a similar fashion, `while let` can be used when you want to conditionally -->

<!-- loop  as long as a value matches a certain pattern. It turns code like this: -->
