Summary
In this chapter, we saw how to apply some of the advanced concepts of the Scala programming language in order to tackle some of the problems that commonly emerge in actual software projects. We looked at the lens design pattern, where we also had our first encounter with the brilliant Scalaz library. We saw how to implement dependency injection without any extra libraries in Scala, and what it is used for. We also learned how we can write extensions to the libraries for which we don't have any modification access. Last but not least, we looked at the type class design pattern, lazy evaluation in Scala, partial functions (also known as function currying), duck typing, memoization, and implicit injection. By now, you should have quite an extensive knowledge of the language possibilities of Scala as well as design patterns, which could be used together to write exceptional software.
In the next and last chapter of this book, we will focus a bit more on the Scalaz library, and we...