All pastes #760897 Raw Edit

Mine

public text v1 · immutable
·published 2007-11-04 13:27 UTC
rendered paste body
 override def act {
    loop {
      react {
        extendedAct
        cases {
          case Hello(x) => println(x)
          case Goodbye(x) => println("fo")
        }
      }
    }
  }
  
  def extendedAct : PartialFunction[Any,Unit]
  def cases(f : PartialFunction[Any,Unit]) : PartialFunction[Any,Unit] = {
    f
  }

// Children would then

def extendedAct = {
   cases {
    ....
   }
}