- 1 How to…
- 1.1 …correctly use imports from Cats?
- 1.2 …compose two Future[Option[T]] values?
- 1.3 …have Either that can contain also both values?
- 1.4 …have Either that accumulates errors?
- 1.5 …have type-safe equality check?
- 1.6 …have type-safe non-empty list?
- 1.7 …use Cats’ extension methods?
- 1.8 …work with mapN and tuples
Cats is popular library for functional programming in Scala and in addition to great official documentation, there is a plethora of articles and blog posts describing this library in depth. I don’t really want to repeat myself, so I decided to give this blog post different approach, more like a how-to style, with set of common problems and how to solve them using Cats. I also won’t go in depth with explanations how used type classes and data types from Cats work, but instead I’ll put links to official documentation, which definitely will do better job :) I’ll also update this blog post in future if I’ll find next topics to add.