August 2018
Intermediate to advanced
380 pages
10h 2m
English
In this chapter, we introduced the idea of a type class, which is central to modern functional programming. We built up to this idea by introducing the Rich Wrapper pattern first, which facilitates type classes in Scala. A type class can be understood as a toolbox to process raw effect types. Another understanding of the Type Class pattern is that it is an injectable interface that you can inject into your classes to achieve polymorphism. Finally, we had a look at how type classes are used in languages other than Scala. In the next chapter, we will learn about the commonly used type classes and the libraries they are organized in.