Scala Design Patterns.
上QQ阅读APP看书,第一时间看更新

The type class design pattern

This design pattern allows us to write generic code by defining a behavior that must be supported by all members of a specific type class. For example, all numbers must support the addition and subtraction operations.