Another minor style thing - I try to be consistent in a single expression whether I'm using dots or not, unless I'm using the dots for precedence, which you aren't doing here. I'd write this as `pf andThen (emit) orElse { case _ => halt }`.