title: How to pattern match even number in the case in scala?
body: <p>I have the following code:</p>
  
  <pre><code>def myfunct(n: Int, steps: Int) = n match {
    case 1 =&gt;  steps
    case (x) =&gt; if (x % 2 == 0) ...
  </code></pre>
  
  <p>Is there anyway to move the even number matching logic into the case ? Do I need a case class?</p>
  
  <p>Such as: </p>
  
  <pre><code>def myfunct(n: Int, steps: Int) = n match {
    case 1 =&gt;  steps
    case (even number??) =&gt; ...
  </code></pre>