Scala's awesome class match pattern recognition