In the previous subsection, we saw how complicated something such as changing one property of a nested class can be. We are going after nice, clean, and correct code, and we also don't want to go against the principles of Scala.
Luckily for us, cases such as the one we just mentioned previously are exactly the reason for the creation of the lens design pattern. In this chapter, we will see the Scalaz library for the first time in this book. It defines many functional programming abstractions for us, and we can easily use them straight away without worrying whether they follow some specific set of rules or not.
So, what are lenses anyway? We won't get too deep into the theoretical aspects here, as this is out of ...