Filter, Closure, Functional syntax version of for loop with multiple conditions
<p>I'm trying to learn some ideas of functional programming, as they exist in Swift. </p>

<p>In a <a href="https://stackoverflow.com/a/40664463/2109038">recent question</a>, it was shown how much better this can be, by <a href="https://stackoverflow.com/users/957768/rickster">Rickster</a> (the guru).</p>

<p>from this:</p>

<pre><code>var voiceToUse: AVSpeechSynthesisVoice?
let voices = AVSpeechSynthesisVoice.speechVoices()         
for voice in voices {
            if voice.name == "Arthur"
            {
                voiceToUse = voice
            }
        }
</code></pre>

<p>to this:</p>

<pre><code>let voiceToUse = AVSpeechSynthesisVoice.speechVoices().filter({ $0.name == "Arthur" }).first
</code></pre>

<p>Now I'm wondering how this technique can be applied to a problem where there's multiple criteria. Can this functional style be done to this:</p>

<pre><code>var voiceToUse: AVSpeechSynthesisVoice?
let voices = AVSpeechSynthesisVoice.speechVoices()     
for voice in voices {
                    if voice.name == "Samantha (Enhanced)"  &amp;&amp; voice.quality == .enhanced
                    {
                        voiceToUse = voice
                    }
                }
</code></pre>