Type classes are an effective (and popular) design pattern in Scala for developing beautiful APIs.