Copyright
Brief Table of Contents
Table of Contents
Why Functional Programming?
Preface
Acknowledgments
About this Book
Chapter 1. What is functional programming?
1.1. What is functional programming?
1.2. Writing useful programs with no side effects
1.3. How referential transparency makes programs safer
1.4. The benefits of functional programming
1.5. Using the substitution model to reason about programs
1.6. Applying functional principles to a simple example
1.7. Pushing abstraction to the limit
1.8. Summary
Chapter 2. Using functions in Java
2.1. What is a function?
2.1.1. Functions in the real world
2.2. Functions in Java
2.2.1. Functional methods
2.2.2. Java functional interfaces and anonymous classes
2.2.3. Composing functions
2.2.4. Polymorphic functions
Exercise 2.1
Solution 2.1
2.2.5. Simplifying the code by using lambdas
Exercise 2.2
Solution 2.2
2.3. Advanced function features
2.3.1. What about functions of several arguments?
Exercise 2.3
Solution 2.3
2.3.2. Applying curried functions
2.3.3. Higher-order functions
Exercise 2.4
Solution 2.4
2.3.4. Polymorphic higher-order functions
Exercise 2.5 (hard)
Solution 2.5
Exercise 2.6 (easy now!)
Solution 2.6
2.3.5. Using anonymous functions