August 2018
Intermediate to advanced
380 pages
10h 2m
English
The first thing to notice here is that the type classes are defined in the format that we saw in the previous chapter. Another thing to notice is the hierarchy of type classes in the Cats library. So, for example, the Monad class extends the FlatMap and Applicative type classes, and if you take a look at the linear super types of the type class, you will see that the ancestors are far more numerous. Also, if you have a look at the subclasses, you will notice that a number of type classes also extend the Monad type class.
The reason for this hierarchy is that the Cats library is quite fine-grained. We previously discussed that type classes can be treated as containers for methods that you're going to use. Type classes ...