title: Scala: short form of pattern matching that returns Boolean
body: <p>I found myself writing something like this quite often:</p>
  
  <pre><code>a match {     
    case `b` =&gt; // do stuff
    case _ =&gt; // do nothing
  }
  </code></pre>
  
  <p>Is there a shorter way to check if some value matches a pattern? I mean, in this case I could just write <code>if (a == b) // do stuff</code>, but what if the pattern is more complex? Like when matching against a list or any pattern of arbitrary complexity. I'd like to be able to write something like this:</p>
  
  <pre><code>if (a matches b) // do stuff
  </code></pre>
  
  <p>I'm relatively new to Scala, so please pardon, if I'm missing something big :)</p>