August 2018
Intermediate to advanced
380 pages
10h 2m
English
The Writer effect type provides us with a bit more of a generic type class than the SimpleWriter implementation. However, if we use it, we do not need to define the SimplerWriter type, as well as an implementation of the type classes for it. Since cats provides the implementation of its type classes for its data types, we don't need to worry about doing this ourselves.
As you may recall, our SimpleWriter object is essentially a pair. The first element of the pair is a list of strings which represents all of the logging messages that were logged by a computation. The other object of a pair is a value that was computed by the computation.
The cats implementation of the Writer object is essentially very similar to our simpler ...