Scala extractors for pattern matching values from bits