Chapter 13. Thinking functionally

This chapter covers

  • Why functional programming?
  • What defines functional programming?
  • Declarative programming and referential transparency
  • Guidelines for writing functional-style Java
  • Iteration vs. recursion

You’ve seen the term functional quite frequently throughout this book. By now, you may have some ideas of what being functional entails. Is it about lambdas and first-class functions? Or is it about restricting your right to mutate objects? In which case, what do you achieve from adopting a functional style? In this chapter, we shed light on these questions. We explain what functional programming is and introduce some of its terminology. We first examine the concepts behind functional programming ...

Get Java 8 in Action: Lambdas, streams, and functional-style programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.