title: Partial Function pattern match split into a class and a trait
body: <p>Lift uses a PartialFunction on their implementation of Comet Actors, and you usually end up with this on your class:</p>
  
  <pre><code>override def lowPriority: PartialFunction[Any,Unit] = {
    case MyCaseClass1(a)        =&gt; do something here
    case MyCaseClass2(a)        =&gt; do something here
    case AlwaysPresentCaseClass =&gt; default action
  }
  </code></pre>
  
  <p>What I'd like to do, and I'm not sure if it is even possible is to split that Partial Function so that the last case can be moved into a trait.</p>
  
  <p>So when I have a new comet actor I simply do:</p>
  
  <pre><code>class MyNewComet extends MyActorTrait {
    override def lowPriority: PartialFunction[Any,Unit] = {
      case MyCaseClass1(a)        =&gt; do something here
      case MyCaseClass2(a)        =&gt; do something here
    }
  }
  </code></pre>
  
  <p>And Somehow the trait MyActorTrait will have the missing</p>
  
  <pre><code>case AlwaysPresentCaseClass =&gt; default action
  </code></pre>