Scala – Extractors

Scala extractor is an object that has a method called unapply as one of its members. The purpose of unapply method is to match a value and take it apart.