Extractors in Scala

If you are a scala developer you may be accustomed with the use of case class in pattern matching. For example Some(x) is a valid pattern…