- Scala Design Patterns.
- Ivan Nikolov
- 41字
- 2021-08-27 19:09:50
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.