title: Idiomatically evaluate true if Option contains specific value
body: <p>I want to write a method that returns <code>true</code> if an <code>Option[Int]</code> contains a specific value and false otherwise. What is the idiomatic way of doing this?</p>
  
  <pre><code>var trueIf5(intOption: Option[Int]): Boolean {
    intOption match {
      case Some(i) =&gt; i == 5
      case None =&gt; false
    }
  }
  </code></pre>
  
  <p>This above solution clearly works, but the Scala docs label this approach as <a href="http://www.scala-lang.org/api/current/index.html#scala.Option" rel="noreferrer">less-idiomatic</a>.</p>
  
  <p>Is there some way I can do the same thing using <code>map</code>, <code>filter</code>, or something else?</p>
  
  <p>I got this far, but it only changes the problem to "Return true if Option contains <code>true</code>", which is effectively the same as "Return true if Option contains <code>5</code>".</p>
  
  <pre><code>var trueIf5(intOption: Option[Int]): Boolean {
    intOption.map(i =&gt; i == 5).???
  }
  </code></pre>