Chapter 5. Functional programming
This chapter covers
- Why functional programming matters
- Mixing functional programming with OOP
- Functions in various forms
- Monads and their practical examples
You’re already doing functional programming using Scala if you’ve been following the examples in the book. In some cases it’s explicitly mentioned or visible and in other cases it’s mixed with object-oriented constructs of the Scala language. This chapter focuses on functional programming concepts and how they can be implemented in Scala. The goal of the chapter is to make you comfortable with functional programming and help you to write code in functional programming style.
Functional programming is a programming paradigm that models computation ...
Get Scala in Action 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.