Fun with Functions, and Never Having to Close That JDBC Connection
Dávid Pollák · Apress eBooks · 2009
We saw Scala functions in action in the last chapter. Passing functions to map and filter allowed us to write code that was more readable and understandable. The looping was done in the method, allowing our application code to be cleaner and easier to maintain. In this chapter, we’ll explore functions in more depth and learn about how functions allow us to encapsulate business logic and separate it from the imperative flow of control statements. We’ll write our own control structures, including looping and automatic JDBC connection closers that will lead to cleaner, better code. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.